Function takes an Xpose object and performs a generalized additive model (GAM) stepwise search for covariates on a single model parameter.
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",
...)
An xpose.data object.
ONE (and only one) model parameter name.
Covariate names to test on parameter.
TRUE if you want GAM output to screen.
Scope of the GAM search.
If dispersion should be used in the GAM object.
Starting model.
Assumption for the parameter distribution.
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
defined by the wts.col
.
Which column in the wts.data
to use.
TRUE for stepwise search, false for no search.
Subset on data.
TRUE if only the first row of each individual's data is to be used.
Normalize to the median of parameter and covariates.
Number of models to examine.
Smoother for each model.
Smoother for each model.
Smoother for each model.
Smoother for each model.
Argument for model 1.
Argument for model 2.
Argument for model 3.
Argument for model 4.
Covariate exclusion from model 1.
Covariate exclusion from model 2.
Covariate exclusion from model 3.
Covariate exclusion from model 4.
Extra exclusion criteria.
Data for the GAM. A data frame.
Used to pass arguments to more basic functions.
Returned is a step.gam
object
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.
## 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