Displaying 1 result from an estimated 1 matches for "myknot".
2008 Jul 17
2
nested calls, variable scope
...command line, with the call to ns nested within it:
> junk2<-lmer(formula=Finished ~ Sex01 + ns(DAT$Age, knots= 74 ) + MinCC + PzC + (1 | NAME ) + (1 | Year), data=myDATonly, family="binomial")
But now I want to do this within a function such as the following:
> myfn
function(myknot=74) {
library(lme4)
library(splines)
cat("myknot=", myknot, "\n")
myMER<-lmer(formula=Finished ~ Sex01 + ns(DAT$Age, knots= myknot) + MinCC + PzC + (1 | NAME ) + (1 | Year), data=myDATonly, family="binomial")
}
> myfn(74)
mykn...