Learn R Programming

cg (version 1.0-2)

fit.cgPairedDifferenceData: 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

## S3 method for class 'cgPairedDifferenceData':
fit(data, type="rr", \dots)

Arguments

data
A data object of class cgPairedDifferenceData.
type
Type of model to fit, represented by a character value. The default value is "rr". The two current possibilities are: [object Object],[object Object]
...
Additional arguments, both optional, that are allowed to be specified dependent on the choice of the type argument. Otherwise they have no effect on the fit: [object Object]

Value

  • Creates an object of class cgPairedDifferenceFit, with the following slots: [object Object],[object Object],[object Object]

concept

  • resistant
  • robust
  • least squares

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".

References

Venables, W. N. and Ripley, B. D. (2002), Modern Applied Statistics with S. Fourth edition. Springer.

Examples

Run this code
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")

Run the code above in your browser using DataLab