Parameters from Hypothesis Testing.

# S3 method for PMCMR
model_parameters(model, ...)

# S3 method for glht
model_parameters(model, ci = 0.95, exponentiate = FALSE, verbose = TRUE, ...)

Arguments

model

Object of class glht (multcomp) or of class PMCMR, trendPMCMR or osrt (PMCMRplus).

...

Arguments passed to or from other methods. For instance, when bootstrap = TRUE, arguments like type or parallel are passed down to bootstrap_model(), and arguments like ci_method are passed down to describe_posterior.

ci

Confidence Interval (CI) level. Default to 0.95 (95%).

exponentiate

Logical, indicating whether or not to exponentiate the the coefficients (and related confidence intervals). This is typical for logistic regression, or more generally speaking, for models with log or logit links. Note: Delta-method standard errors are also computed (by multiplying the standard errors by the transformed coefficients). This is to mimic behaviour of other software packages, such as Stata, but these standard errors poorly estimate uncertainty for the transformed coefficient. The transformed confidence interval more clearly captures this uncertainty. For compare_parameters(), exponentiate = "nongaussian" will only exponentiate coefficients from non-Gaussian families.

verbose

Toggle warnings and messages.

Value

A data frame of indices related to the model's parameters.

Examples

# \donttest{
if (require("multcomp", quietly = TRUE)) {
  # multiple linear model, swiss data
  lmod <- lm(Fertility ~ ., data = swiss)
  mod <- glht(
    model = lmod,
    linfct = c(
      "Agriculture = 0",
      "Examination = 0",
      "Education = 0",
      "Catholic = 0",
      "Infant.Mortality = 0"
    )
  )
  model_parameters(mod)
}
#> 
#> Attaching package: ‘mvtnorm’
#> The following object is masked from ‘package:mclust’:
#> 
#>     dmvnorm
#> 
#> Attaching package: ‘TH.data’
#> The following object is masked from ‘package:MASS’:
#> 
#>     geyser
#> # Fixed Effects
#> 
#> Parameter             | Coefficient |   SE |         95% CI | t(41) |      p
#> ----------------------------------------------------------------------------
#> Agriculture == 0      |       -0.17 | 0.07 | [-0.36,  0.01] | -2.45 | 0.079 
#> Examination == 0      |       -0.26 | 0.25 | [-0.93,  0.41] | -1.02 | 0.785 
#> Education == 0        |       -0.87 | 0.18 | [-1.35, -0.39] | -4.76 | < .001
#> Catholic == 0         |        0.10 | 0.04 | [ 0.01,  0.20] |  2.95 | 0.024 
#> Infant Mortality == 0 |        1.08 | 0.38 | [ 0.07,  2.09] |  2.82 | 0.033 
#> 
#> p-value adjustment method: single-step
#> 
if (require("PMCMRplus", quietly = TRUE)) {
  model <- kwAllPairsConoverTest(count ~ spray, data = InsectSprays)
  model_parameters(model)
}
#> Warning: Ties are present. Quantiles were corrected for ties.
#> Conover's all-pairs test
#> 
#> Group1 | Group2 | Statistic |      p | alternative | Distribution | p_adjustment
#> --------------------------------------------------------------------------------
#> B      |      A |      0.89 | 0.988  |   two.sided |            q |  single-step
#> C      |      A |    -13.58 | < .001 |   two.sided |            q |  single-step
#> C      |      B |    -14.47 | < .001 |   two.sided |            q |  single-step
#> D      |      A |     -8.87 | < .001 |   two.sided |            q |  single-step
#> D      |      B |     -9.76 | < .001 |   two.sided |            q |  single-step
#> D      |      C |      4.71 | 0.017  |   two.sided |            q |  single-step
#> E      |      A |    -10.95 | < .001 |   two.sided |            q |  single-step
#> E      |      B |    -11.84 | < .001 |   two.sided |            q |  single-step
#> E      |      C |      2.63 | 0.437  |   two.sided |            q |  single-step
#> E      |      D |     -2.09 | 0.681  |   two.sided |            q |  single-step
#> F      |      A |      1.15 | 0.964  |   two.sided |            q |  single-step
#> F      |      B |      0.26 | > .999 |   two.sided |            q |  single-step
#> F      |      C |     14.74 | < .001 |   two.sided |            q |  single-step
#> F      |      D |     10.02 | < .001 |   two.sided |            q |  single-step
#> F      |      E |     12.11 | < .001 |   two.sided |            q |  single-step
# }