fit_method.lwmod: Get the result of fitting a Laird and Ware linear or...

Description Usage Arguments Details Note Examples

View source: R/analysis_fit_methods.R

Description

Get the result of fitting a Laird and Ware linear or quadratic model to a dataset

Usage

1
2
## S3 method for class 'lwmod'
fit_method(dat, ...)

Arguments

dat

data frame containing variables to model

...

additional parameters, most notably deg which controls the degree of polynomial for the fit (1 for linear and 2 for quadratic)

Details

This essentially gets an anthropometric dataset into shape for sitar (sets appropriate data structure and removes missing values) and runs the fitting routine.

Note

The settings for x_trans and y_trans must match that used in fit_trajectory and appropriate inverse transformations must be set there accordingly as well.

Examples

1
2
3
4
5
6
## Not run: 
lwfit <- get_fit(cpp, y_var = "haz", method = "lwmod", deg = 2)
fit <- fit_trajectory(subset(cpp, subjid == 2), fit = lwfit)
plot(fit)

## End(Not run)

hafen/hbgd documentation built on March 1, 2020, 5:31 p.m.