| fit.cgPairedDifferenceData {cg} | R Documentation |
Fit models to a cgPairedDifferenceData object
Description
Fits a paired difference model based
on the cgPairedDifferenceData object. The
created object is designed for paired samples
collected data, and is of class cgPairedDifferenceFit.
Usage
## S4 method for signature 'cgPairedDifferenceData'
fit(data, type="rr", ...)
Arguments
data |
A data object of class |
type |
Type of model to fit, represented by a character
value. The default value is
|
... |
Additional arguments, both optional, that are allowed to be specified dependent on
the choice of the
|
Details
In the current version of the cg package, most default settings
for rlm are kept for the
fit.cgPairedDifferenceData method wrapper call when
type="rr", with no capability to choose
another value for an arguments such as psi, scale.est,
and k2. The method argument is set to "MM".
Value
Creates an object of class cgPairedDifferenceFit, with the
following slots:
olsfitThe contents of a
lmfit to the data. This is always populated with anlmobject no matter the choice of thetypeargument, such ascode="rr".rrfitThe contents of a
rlmfit to the data, housed as arrfitclass object. Iftype="rr"is not selected, then this is set to a simple character value of"No fit was selected.".settingsA list of properties carried as-is from the
dataargument object of classcgPairedDifferenceData. In particular, ifzeroscoreis specified as a non-NULLnumber in thecgPairedDifferenceDataobject in thedataargument, then a score value near zero was derived to replace all zeroes for subsequent log-scale analyses. Alternatively, ifaddconstantis specified as a non-NULLnumber in thecgPairedDifferenceDataobject in thedataargument, then a value was added to shift up all observations for subsequent log-scale analyses.
Note
Contact cg@billpikounis.net for bug reports, questions, concerns, and comments.
Author(s)
Bill Pikounis [aut, cre, cph], John Oleynick [aut], Eva Ye [ctb]
References
Venables, W. N. and Ripley, B. D. (2002), Modern Applied Statistics with S. Fourth edition. Springer.
Examples
data(anorexiaFT)
anorexiaFT.data <- prepareCGPairedDifferenceData(anorexiaFT, format="groupcolumns",
analysisname="Anorexia FT",
endptname="Weight",
endptunits="lbs",
expunitname="Patient",
digits=1, logscale=TRUE)
anorexiaFT.fit <- fit(data=anorexiaFT.data, type="rr")