replicate_data {regtomean} | R Documentation |
Replicates before and after values 100 times.
Description
This function replicates 100 times the "before" and "after" values, given a start and end reference for the population mean (mu
).
Usage
replicate_data(start, end, Before, After, data)
Arguments
start |
A numeric value specifying the start value for |
end |
A numeric value specifying the end value for |
Before |
A numeric vector giving the data values for the first ("before") measurement. |
After |
A numeric vector giving the data values for the second ("after") measurement. |
data |
An optional data frame containing the |
Details
To overcome the limitations of Mee and Chua's test regarding the population mean (mu
),
this function performs a replication of the data over a specified range of values.
The replicated data is used for systematically estimating the unknown population mean (mu
).
Further analyses are based on this new dataset.
Value
A data frame containing the replicated dataset, which includes the columns mu
, before
, and after
.
Author(s)
Daniela 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.
Galton, F. (1886). Regression towards mediocrity in hereditary stature. Journal of the Anthropological Institute (15: 246-263).
See Also
Examples
# Example usage of replicate_data
replicate_data(0, 100, "Before", "After", data = language_test)