meechua_reg {regtomean} | R Documentation |
Fit linear models on the (replication) data.
Description
This function fit linear models for a subset of data frames.
Usage
meechua_reg(x)
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.
The models are saved in an obejct called mee_chua
, which is not automatically printted but is saved in the environment.
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
Examples
## 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)