Displaying 2 results from an estimated 2 matches for "modelframe".
2012 Jun 19
1
Possible bug when using encomptest
...d via the
##nlme::lmList() function.
##Required libraries:
library(nlme)
library(lmtest)
library(plyr)
##Create a noisy slope (spoofing real-world data):
fakeData<-c(rnorm(10))+seq(0,5,length=10)
##Create 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 |...
2014 Oct 03
2
How I() works in a formula
...I() function does nothing more than add the class "AsIs". I've
been browsing the source code of R for a couple of days now trying to
locate where this class assignment gets translated into a specific action,
but i couldn't locate it. I've been as far as the internal C function
modelframe.
Any pointers on how I() is processed internally are greatly appreciated.
Cheers
Joris
--
Joris Meys
Statistical consultant
Ghent University
Faculty of Bioscience Engineering
Department of Mathematical Modelling, Statistics and Bio-Informatics
tel : +32 9 264 59 87
Joris.Meys at Ugent.be
----...