fitGrowth: Ease of use wrapper function for fitting various growth...

View source: R/fitGrowth.R

fitGrowthR Documentation

Ease of use wrapper function for fitting various growth models specified by growthSS

Description

Ease of use wrapper function for fitting various growth models specified by growthSS

Usage

fitGrowth(ss, ...)

Arguments

ss

A list generated by growthSS.

...

Additional arguments passed to model fitting functions determined by ss$type. For type = "nlme" these are passed to nlme::nlmeControl, not nlme::nlme. Additional arguments are documented in fitGrowthbrms, fitGrowthnlme, fitGrowthnls, fitGrowthnlrq, fitGrowthmgcvgam, fitGrowthsurvreg, fitGrowthflexsurv.

Value

A fit model from the selected type.

See Also

growthPlot for model visualization, testGrowth for hypothesis testing, barg for Bayesian model reporting metrics.

Examples


simdf <- growthSim("logistic",
  n = 20, t = 25,
  params = list("A" = c(200, 160), "B" = c(13, 11), "C" = c(3, 3.5))
)
ss <- growthSS(
  model = "logistic", form = y ~ time | group,
  df = simdf, type = "nls"
)
fitGrowth(ss)
ss <- growthSS(
  model = "gam", form = y ~ time | group,
  df = simdf, type = "nls"
)
fitGrowth(ss)


pcvr documentation built on April 16, 2025, 5:12 p.m.