growthfd.fit: Fit a FPCA Growth Curve Model to measurements of a single...

View source: R/growthfd.fit.R

growthfd.fitR Documentation

Fit a FPCA Growth Curve Model to measurements of a single individual

Description

This function fits a model to the given measured data of a single individual.

Usage

growthfd.fit(model, age, height, nprint = 1)

Arguments

model

FPCA growth model to be fitted

age

Age at measured data points

height

Height at at measured data points

nprint

Verbosity

Value

An optimization result object

Examples

age <- c(6.9, 8.2, 10, 12.1)
height <- c(114, 122, 130, 141)
fit <- growthfd.fit(model.bgs.m, age=c(6.9, 8.2, 10, 12.1), height=c(114, 122, 130, 141))
x11()
growthfd.plot(model.bgs.m, fit$par)
points(age, height)
x11()
growthfd.plot(model.bgs.m, fit$par, from=0.5, deriv = 1)
x11()
growthfd.plot(model.bgs.m, fit$par, from=0.5, deriv = 2)


ondrej-klima/growthfd documentation built on Jan. 4, 2023, 10:37 a.m.