How to add fixed effect to four-parameter logistic model in nlmer

空扰寡人 提交于 2020-01-13 10:15:16

问题


I am trying to use nlmer with SSfpl to fit some data with a four-parameter logistic function. I can get a fine fit for the overall data using:

nm.fpl <- nlmer(meanFix ~ SSfpl(Time, A, B, xmid, scal) ~ (scal | Subject), 
          data = dataSubset, start = c(A = 0.2, B = 0.7, xmid = 600, scal = 100))

Now I want to add a fixed effect of Condition, which has 2 within-Subject levels. I would like to evaluate whether the two Conditions differ in terms of any of the 4 parameters (A, B, xmid, scal), but I don't know how to specify that in this formula. I can fit model separately to the two subsets (Condition A and Condition B) and then compare the parameters, but that doesn't seem like the right approach.


回答1:


Have you tried to add an interaction?

nm.fpl <- nlmer(meanFix ~ SSfpl(Time, A * Condition, B, xmid, scal) ~ (scal | Subject), 
          data = dataSubset, start = c(A = 0.2, B = 0.7, xmid = 600, scal = 100))
nm.fpl <- nlmer(meanFix ~ SSfpl(Time, A : Condition, B, xmid, scal) ~ (scal | Subject), 
          data = dataSubset, start = c(A = 0.2, B = 0.7, xmid = 600, scal = 100))


来源:https://stackoverflow.com/questions/11056625/how-to-add-fixed-effect-to-four-parameter-logistic-model-in-nlmer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!