Last chance! 50% off unlimited learning
Sale ends in
Calculates Huber M-estimator and confidence intervals for groups.
groupwiseHuber(formula = NULL, data = NULL, var = NULL, group = NULL,
conf.level = 0.95, ci.type = "wald", ...)
A formula indicating the measurement variable and the grouping variables. e.g. y ~ x1 + x2.
The data frame to use.
The measurement variable to use. The name is in double quotes.
The grouping variable to use. The name is in double quotes. Multiple names are listed as a vector. (See example.)
The confidence interval to use.
The type of confidence interval to use. Can be
"wald"
or "boot"
.
See HuberM
for details.
Other arguments passed to the HuberM
function.
A data frame of requested statistics by group.
A wrapper for the HuberM
function
to allow easy output for multiple groups.
The input should include either formula
and data
;
or data
, var
, and group
. (See examples).
# NOT RUN {
### Example with formula notation
data(Catbus)
groupwiseHuber(Steps ~ Teacher + Sex,
data = Catbus,
ci.type = "wald")
### Example with variable notation
data(Catbus)
groupwiseHuber(data = Catbus,
var = "Steps",
group = c("Teacher", "Sex"),
ci.type = "wald")
# }
Run the code above in your browser using DataLab