lsq: Least Squares Coefficients

Description Usage Arguments Value Examples

View source: R/TimeSeries.R

Description

Least Squares Coefficients

Usage

1
lsq(data, degree = 1, orthog = FALSE, scale = FALSE)

Arguments

data

A matrix with longitudinal data, with a column named "time" containing the time (in arbitrary units) of the measure. lsq() will consider that the row names that share id are repeated measures at different times from the same individual.

degree

The degree of the polynomial to be fitted.

orthog

If true, use orthogonal polynomials.

scale

If true, divide each coefficient by its variance

Value

An object of class lsq containing the intercept and coefficients over time of for each variable and individual.

Examples

1
2
3
growth2 <- growth
colnames(growth2) <-  c( "time", "height")
lsq(data=growth2,degree=2)

Yuliaxis/kernInt documentation built on Feb. 20, 2022, 12:38 a.m.