Learn R Programming

rcompanion (version 1.0.1)

groupwiseHuber: Groupwise Huber M-estimators and confidence intervals

Description

Calculates Huber M-estimator and confidence intervals for groups.

Usage

groupwiseHuber(data, group, var, conf.level = 0.95, conf.type = "wald", ...)

Arguments

data
The data frame to use.
group
The grouping variable to use. The name is in double quotes. Multiple names are listed as a vector. (See example.)
var
The measurement variable to use. The name is in double quotes.
conf.level
The confidence interval to use.
conf.type
The type of confidence interval to use. Can be "wald" or "boot". See HuberM for details.
...
Other arguments passed to the HuberM function.

Value

A data frame of requested statistics by group.

Details

A wrapper for the HuberM function to allow easy output for multiple groups.

References

http://rcompanion.org/rcompanion/d_08a.html

See Also

groupwiseMean, groupwiseMedian groupwiseGeometric

Examples

Run this code
data(Catbus)
groupwiseHuber(data      = Catbus,
               var       = "Steps",
               group     = c("Teacher", "Sex"),
               conf.type = "wald")
                      

Run the code above in your browser using DataLab