Learn R Programming

cg (version 1.0-2)

downweightedTable.cgPairedDifferenceFit: Create a table of downweighted observations from a Resistant & Robust fit.

Description

Create a table of downweighted observations based on a rrfit object within a cgPairedDifferenceFit object. A cgPairedDifferenceDownweightedTable class object is created.

Usage

## S3 method for class 'cgPairedDifferenceFit':
downweightedTable(fit, cutoffwt, display = "print",\dots)

Arguments

fit
A fit object of class cgPairedDifferenceFit.
cutoffwt
It has no default and must be specified as a numeric between 0 and 1 exclusive. It is a threshold. All observations that fall beneath the threshold will be identified. For example, a cutoffwt=0.90 will yield those
display
One of three valid values: [object Object],[object Object],[object Object]
...
Additional arguments. None are currently defined for this method.

Value

  • An object of class cgPairedDifferenceDownweightedTable, with the following slots: [object Object],[object Object],[object Object]

Details

If no observations meet the cutoff criteria, a text message of the cgPairedDifferenceDownweightedTable content emptiness is output instead. The reported weights are in the scale of the observation, not the sum of squared errors representation for the likelihood. Thus they are derived from the square root of the $w component from a MASS::rlm fit object.

References

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

See Also

cgPairedDifferenceFit, MASS::rlm

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(anorexiaFT.data)

downweightedTable(anorexiaFT.fit, cutoffwt=0.25) ## No observation

downweightedTable(anorexiaFT.fit, cutoffwt=0.75) ## downweighted at least 25\%

Run the code above in your browser using DataLab