Learn R Programming

HRM (version 1.3.0)

confint.HRM: Function to calculate confidence intervals

Description

Function to calculate simultaneous, asymptotic (1-alpha) confidence intervals for an object of class 'HRM'.

Usage

# S3 method for HRM
confint(object, parm, level = 0.95, ...)

Value

Returns a data.frame with mean and 1-alpha confidence interval for each factor level combination. The attribute "status" states which form of multiplicity control was used: family-wise error rate over all factor level combinations, family-wise error rate within each whole-plot group, a Sidak correction within each group, or none.

Arguments

object

an object from class 'HRM' returned from the function hrm_test

parm

currently ignored; all possible confidence intervals are calculated

level

confidence level (FWER) used for calculating the inverals

...

Further arguments passed to 'hrm_test' will be ignored

Examples

Run this code
# using the EEG dataset
z <- hrm_test(value ~ dimension, subject = "subject", data = EEG)

# simultaneous confidence intervals for each factor level combination
ci <- confint(z)
head(ci)

# which form of multiplicity control was used
attr(ci, "status")

# \donttest{
# With a whole-plot factor the correlation matrix can become large enough
# that mvtnorm::qmvnorm() fails. confint() then falls back to controlling
# the family-wise error rate within each group, or to a Sidak correction.
# The status says which of these was actually used.
z <- hrm_test(value ~ group*region*variable, subject = "subject", data = EEG)
ci <- confint(z, level = 0.99)
attr(ci, "status")
# }

Run the code above in your browser using DataLab