Dear R users, I am using nlme to fit a pharmacokinetic model. The base model is parameterized in terms of CL, V1, V2 and Q. basemodel<-nlme(Conc ~TwoCompModel(CL,Q,V1,V2,Time,ID), data = data2, fixed=list(CL+Q+V1+V2~1), random = pdDiag(CL+V1+V2~1), start=c(CL=log(20),Q=log(252),V1=log(24.9),V2=log(120)), control=list(returnObject=TRUE,msVerbose=TRUE, msMaxIter=20,pnlsMaxIter=20,pnlsTol=1), verbose=TRUE). Now, I want to include covariates (age and weight) in the base model. The relationships between CL and covariate is linear and given as the following equation. CL=TVCL+a*wt-b*age, where TVCL is mean clearance, a and b are coefficients of weight and age, respectively. How do I write this in nlme to estimate TVCL, a and b? Any input would be appreciated. Regards Shailly Mehrotra Center for Translational Medicine School of Pharmacy University of Maryland Baltimore, MD, USA [[alternative HTML version deleted]]
SHAILLY MEHROTRA <shaillymehrotra <at> gmail.com> writes:> I am using nlme to fit a pharmacokinetic model. The base model is > parameterized in terms of CL, V1, V2 and Q. > > basemodel<-nlme(Conc ~TwoCompModel(CL,Q,V1,V2,Time,ID), > data = data2, fixed=list(CL+Q+V1+V2~1), > random = pdDiag(CL+V1+V2~1), > start=c(CL=log(20),Q=log(252),V1=log(24.9),V2=log(120)), > control=list(returnObject=TRUE,msVerbose=TRUE, > msMaxIter=20,pnlsMaxIter=20,pnlsTol=1), > verbose=TRUE). > > Now, I want to include covariates (age and weight) in the base model. The > relationships between CL and covariate is linear and given as the following > equation. > > CL=TVCL+a*wt-b*age, where TVCL is mean clearance, a and b are coefficients > of weight and age, respectively.I believe you want something like fixed=list(Q+V1+V2~1,CL~wt+age) Questions about mixed models may in general have better success on the r-sig-mixed-models <at> r-project.org mailing list. Ben Bolker