[R] an error in nlme package

2015-07-13 Thread Patty Haaem via R-help
Dear All,I am trying to fit one compartment IV bolus model on pharmacokinetic 
data using phenoModel function in nlme package, based on a tutorial entitled  
Development of population PK model using R- Case study I. The codes are as 
fallowing:
library(nlme)mydata.grp - groupedData(CONC~TIME|CID,data=mydata)mydata.fit  
-nlme(CONC~phenoModel(CID,TIME,AMT,lCl,lV),fixed=lCl+lV~1,random=pdDiag(lCl+lV~1),
 
data=mydata.grp,start=c(-5,0),weight=varConstPower(const=1,fixed=list(power=1)),na.action=na.include,naPattern=~!is.na(CONC))
when I run above codes, I get the following error:Error in nlme.formula(CONC ~ 
phenoModel(CID, TIME, AMT, lCl, lV), fixed = lCl +  :   object 'na.include' not 
found
could you please tell me, how should I correct the codes?Thanks in advanceElham 
Haem



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] A question about nlmer in lme4 package

2015-07-11 Thread Patty Haaem via R-help
Dear all,I have studied “Mixed models in R using the lme4 package Part 6: 
Nonlinear mixed models” by Douglas Bates. In this tutorial, there are some 
codes to fit nonlinear mixed models for Theoph data. The codes are as fallows: 
Th. start - c(lKe = -2.5, lKa = 0.5 , lCl = -3) nm1 - nlmer ( conc ~ SSfol 
(Dose , Time ,lKe , lKa , lCl) ~+    0+ lKe+lKa+lCl +(0+ lKe| Subject )+(0+ 
lKa| Subject )+    +(0+ lCl| Subject ), nAGQ =0, Theoph ,+     start = Th.start 
, verbose = TRUE )
  I want to add a covariate (like age) to CL parameter. How should I modify 
above codes? what's more, how  are selected initial values (lKe = -2.5, lKa = 
0.5 , lCl = -3) ?
Thanks in advanceElham
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.