meechua_reg: Fit linear models on the (replication) data.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/meechua_reg.R

Description

This function fit linear models for a subset of data frames.

Usage

1

Arguments

x

Data to be used in the regression.

Details

The data used for the regression must be sorted by mu.

A set of linear models will be estimated and model coefficients are saved and stored in mod_coef.

The estimated standard errror for the after measure is also stored in se_after to be used further in other functions.

Value

A table containing the estimations for each mu. Global variables models, mod_coef, se_after are stored for further analysis.

Author(s)

Daniela R. Recchia, Thomas Ostermann.

References

Ostermann, T., Willich, Stefan N. & Luedtke, Rainer. (2008). Regression toward the mean - a detection method for unknown population mean based on Mee and Chua's algorithm. BMC Medical Research Methodology.

See Also

lm,dlply

Examples

1
2
3
4
5
#sort mu ##
replicate_data(language_test,50,60,"Before","After",data=language_test)
mee_chua_sort <- mee_chua[with(mee_chua,order(mu)),]

meechua_reg(mee_chua_sort)

regtomean documentation built on Jan. 29, 2021, 5:14 p.m.