coVar.id {PKtools}R Documentation

coVar.id

Description

coVar.id creates a data set of the covariates one line per id with id as the first column.

Usage

coVar.id(id, coVar, nameData) 

Arguments

id cluster id
coVar data set of the covariates with length equal to the full data set
nameData list of names, including, covnames

Value

coVar.id outputs a data set of the covariates one line per id with id as the first column.

Author(s)

M.S. Blanchard <sblanchard@coh.org>

See Also

RunNM, RunNLME, RunWB

Examples

library(PKtools)
library(nlme) 
data(Theoph) 
Theoph<-Theoph[Theoph$Time!=0,]
id<-as.numeric(as.character(Theoph$Subject)) 
dose<-Theoph$Dose
time<-Theoph$Time 
conc<-round(sqrt(Theoph$conc),4)
Theo<-data.frame(cbind(id,dose,time,conc))
names(Theo)<-c("id","dose","time","conc") 
wt.v<-Theoph$Wt
data<-list(pkvar=Theo, cov=wt.v) 

nameData<-list(covnames=c("wt"))

descStructure<-list(pcts=c(.025,.05,.95,.975),nsig=4)

cov.id <- coVar.id(data$pkvar$id, data$cov, nameData)
cov.id

[Package PKtools version 1.4-0 Index]