search for: mydaton

Displaying 1 result from an estimated 1 matches for "mydaton".

Did you mean: mydatan
2008 Jul 17
2
nested calls, variable scope
...solve this? # The call to ns works at the command line: > junk<-ns(DAT$Age, knots=74) # The call to lmer works at the 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$A...