meechua_reg {regtomean} | R Documentation |
This function fit linear models for a subset of data frames.
meechua_reg(x)
x |
Data to be used in the regression. |
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.
A table containing the estimations for each mu
.
Global variables models
, mod_coef
, se_after
are stored for further analysis.
The models are saved in an obejct called mee_chua
, which is not automatically printted but is saved in the environment.
Daniela R. Recchia, Thomas Ostermann.
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.
## get the values ##
mee_chua<-replicate_data(50,60,"Before","After",data=language_test)
## sort mu ##
mee_chua_sort <- mee_chua[with(mee_chua,order(mu)),]
meechua_reg(mee_chua_sort)