[R] an error in nlme package
David Winsemius
dwinsemius at comcast.net
Mon Jul 13 17:28:14 CEST 2015
On Jul 13, 2015, at 12:04 AM, Patty Haaem via R-help wrote:
> 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
I would ask the question: where id you get the idea that there was an `na.include` function or option to `nmle`?
I don't see it mentioned in the help page (and in fact see a specific warning about what will happen with dataset that have NA's. Most of the na.* options are actually functions that process the data and can be found with ?na.omit.
I could certainly be uninformed about some new wonderful workaround to the problem, but at the moment I'm guessing you were hoping for a magical effect from na.include that doesn't yet have an underlying R incantation.
--
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list