Displaying 1 result from an estimated 1 matches for "modelfactor".
2012 Jun 19
1
Possible bug when using encomptest
...eate a data frame of data to test. The columns
##model1 and model2 contain my basis functions
modelFrame<-as.data.frame(
list(
srcData=fakeData,
model1=seq(0,1,length=10),
model2=c(rep(0,5),rep(1,5))
)
)
##Create all data to be fitted
allData<-ldply(1:2,function(x){modelFrame$modelFactor<-x;return(modelFrame)})
##Apply models by factor:
models1<-lmList(srcData ~ model1 | modelFactor,data=allData)
models2<-lmList(srcData ~ model2 | modelFactor,data=allData)
##Attempt to apply encomptest - it fails!
encomptest(models1[[1]],models2[[1]])
##Now, create two models by hand
mo...