Learn R Programming

xpose4 (version 4.5.3)

change.xvardef: Change Xpose variable definitions.

Description

These functions allow for the changing of Xpose variable definitions like "idv" and "dv". These variable definitions are used to refer to columns of the observed data in a generic way, so that generic plotting functions can be created.

Usage

change.xvardef(object,var = ".ask", def = ".ask", listall = TRUE,
               classic = FALSE, check.var = FALSE, ...)

change.xvardef(object, var, listall=FALSE, classic=FALSE, check.var=FALSE, ...) <- value

Value

If called from the the command line then this function returns an xpose database. If called from the classic interface this function updates the current xpose database (.cur.db).

Additional arguments

The default xpose variables are:

id

Individual identifier column in dataset

idlab

values used for plotting ID values on data points in plots

occ

The occation variable

dv

The dv variable

pred

The pred variable

ipred

The ipred variable

wres

The wres variable

cwres

The cwres variable

res

The res variable

parms

The parameters in the database

covariates

The covariates in the database

ranpar

The random parameters in the database

Acknowledgements

Thanks to Sebastien Bihorel for input which helped create this function.

See Also

xvardef, xpose.data

Examples

Run this code

# Change the "id" variable to point to "PRED" in the xpose object
xpdb <- change.xvardef(xpdb,var="id",def="PRED")

# Check the value of the "id" variable
xvardef("id",xpdb)

# Change the "idv" variable
change.xvardef(xpdb,var="idv") <- "TIME"

# Change the covariate scope
change.xvardef(xpdb,var="covariates") <- c("SEX","AGE","WT")

# Use the interactive capabilities of the function
xpdb <- change.xvardef(xpdb)

Run the code above in your browser using DataLab