Learn R Programming

xpose4 (version 4.5.0)

xpose.gam: Stepwise GAM search for covariates on a parameter (Xpose 4)

Description

Function takes an Xpose object and performs a generalized additive model (GAM) stepwise search for covariates on a single model parameter.

Usage

xpose.gam(object,
           parnam = xvardef("parms", object)[1],
           covnams = xvardef("covariates", object),
           trace = TRUE,
           scope = NULL, 
	         disp = object@Prefs@Gam.prefs$disp,
           start.mod = object@Prefs@Gam.prefs$start.mod,
           family = "gaussian",
           wts.data =object@Data.firstonly,
           wts.col=NULL,
           steppit = object@Prefs@Gam.prefs$steppit,
           subset = xsubset(object),
           onlyfirst = object@Prefs@Gam.prefs$onlyfirst,
           medianNorm = object@Prefs@Gam.prefs$medianNorm,
           nmods = object@Prefs@Gam.prefs$nmods,
           smoother1 = object@Prefs@Gam.prefs$smoother1,
           smoother2 = object@Prefs@Gam.prefs$smoother2,
           smoother3 = object@Prefs@Gam.prefs$smoother3,
           smoother4 = object@Prefs@Gam.prefs$smoother4,
           arg1 = object@Prefs@Gam.prefs$arg1,
           arg2 = object@Prefs@Gam.prefs$arg2,
           arg3 = object@Prefs@Gam.prefs$arg3,
           arg4 = object@Prefs@Gam.prefs$arg4,
           excl1 = object@Prefs@Gam.prefs$excl1,
           excl2 = object@Prefs@Gam.prefs$excl2,
           excl3 = object@Prefs@Gam.prefs$excl3,
           excl4 = object@Prefs@Gam.prefs$excl4,
           extra = object@Prefs@Gam.prefs$extra,
           ...)
           
xp.get.disp(gamdata,
           parnam,
           covnams,
           family = "gaussian",
           ...)

Arguments

object
An xpose.data object.
parnam
ONE (and only one) model parameter name.
covnams
Covariate names to test on parameter.
trace
TRUE if you want GAM output to screen.
scope
Scope of the GAM search.
disp
If dispersion should be used in the GAM object.
start.mod
Starting model.
family
Assumption for the parameter distribution.
wts.data
Weights on the least squares fitting of parameter vs. covariate. Often one can use the variances of the individual parameter values as weights. This data frame must have column with name ID and any subset variable as well as the variable d
wts.col
Which column in the wts.data to use.
steppit
TRUE for stepwise search, false for no search.
subset
Subset on data.
onlyfirst
TRUE if only the first row of each individual's data is to be used.
medianNorm
Normalize to the median of parameter and covariates.
nmods
Number of models to examine.
smoother1
Smoother for each model.
smoother2
Smoother for each model.
smoother3
Smoother for each model.
smoother4
Smoother for each model.
arg1
Argument for model 1.
arg2
Argument for model 2.
arg3
Argument for model 3.
arg4
Argument for model 4.
excl1
Covariate exclusion from model 1.
excl2
Covariate exclusion from model 2.
excl3
Covariate exclusion from model 3.
excl4
Covariate exclusion from model 4.
extra
Extra exclusion criteria.
gamdata
Data for the GAM. A data frame.
...
Used to pass arguments to more basic functions.

Value

Details

xpose.gam performs a stepwise GAM search for influential covariates. xp.get.disp is a helper function for calculating dispersion, and is not intended to be used by itself.

See Also

xp.gam, step.gam

Examples

Run this code
## We expect to find the required NONMEM run and table files for run
## 5 in the current working directory
xpdb <- xpose.data(5)

## Here we load the example xpose database 
data(simpraz.xpdb)
xpdb <- simpraz.xpdb

xpose.gam(xpdb, parnam="CL", covnams = xvardef("covariates", xpdb))

Run the code above in your browser using DataLab