frwd_selection: Forward covariate selection for nlme-base non-linear mixed...

View source: R/vpc.R

frwd_selectionR Documentation

Forward covariate selection for nlme-base non-linear mixed effect models

Description

Implements forward covariate selection for nlme-based non-linear mixed effect models

Usage

frwd_selection(base, cv, dat, cutoff = 0.05)

Arguments

base

base model

cv

a list of candidate covariate to model parameters

dat

model data

cutoff

significance level

Value

an nlme object of the final model

Examples


dat <- theo_md
dat$LOGWT <- log(dat$WT)
dat$TG <- (dat$ID < 6) + 0 # dummy covariate

specs <- list(
  fixed = list(lKA = lKA ~ 1, lCL = lCL ~ 1, lV = lV ~ 1),
  random = pdDiag(lKA + lCL ~ 1),
  start = c(0.5, -3.2, -1)
)
fit0 <- nlme_lin_cmpt(dat, par_model = specs, ncmt = 1)
cv <- list(lCL = c("WT", "TG"), lV = c("WT"))
fit <- frwd_selection(fit0, cv, dat)
print(summary(fit))


nlmixr documentation built on March 27, 2022, 5:05 p.m.