Average (over the estimation data) effect of each covariate on every
category probability and, for inflated models, on the probability of the
ordered regime (one per split equation under a category-specific split).
ame() has no profile mode by design – it always averages over the
estimation data (or over newdata); for the effect at a covariate profile
use first_difference() with newdata =.
Numeric covariates get a derivative (central difference
averaged over observations); 0/1 covariates get the discrete change 0 -> 1;
factors get each level against the base level. By default a covariate is
moved in every equation in which it appears (the total effect); stage
restricts the move to the outcome or the inflation equation, as in
first_difference(). Intervals are by the delta method.
Arguments
- object
An
"iord"object.- vars
Covariates to include (default: all covariates in either equation, excluding unit identifiers).
- level
Confidence level.
- ci
"delta"(default) or"none".- eps
Relative step for numeric derivatives (times the covariate's SD).
- decompose
For inflated models, also report the effects on the two components of the inflated-category probability – through the inflation process and through the ordered stage (Harris and Zhao 2007; see
predict(type = "zeros")).- stage
For inflated models: move each covariate in
"both"equations (default, the total effect), in the"outcome"equation only, or in the"inflation"equation only. A covariate absent from the selected equation has a zero effect.
Value
A data frame of class c("iop_ame", "data.frame"): variable,
contrast, component, estimate, lower, upper, method.
See also
first_difference(), plot.iop_fd(), predict.iord()
Other quantities of interest:
first_difference(),
plot.iop_fd(),
predict.iord()
Examples
set.seed(2)
d <- riop(600, beta = c(0.8, -0.5), tau = c(-0.6, 0.7), gamma = c(0.3, 1), inflate = "bottom")
m <- iop(y ~ x1 + x2 | z1, d, inflate = "bottom")
ame(m)
#> Average marginal effects (delta-method intervals; derivatives for continuous covariates, discrete changes otherwise)
#> variable contrast component estimate lower upper
#> x1 dP/dx P(y = 0) -0.1149 -0.1385 -0.0912
#> x1 dP/dx P(y = 1) -0.0136 -0.0303 0.0032
#> x1 dP/dx P(y = 2) 0.1284 0.1103 0.1466
#> x1 dP/dx P(ordered regime) 0.0000 0.0000 0.0000
#> x2 dP/dx P(y = 0) 0.0710 0.0487 0.0933
#> x2 dP/dx P(y = 1) 0.0084 -0.0022 0.0189
#> x2 dP/dx P(y = 2) -0.0794 -0.1013 -0.0574
#> x2 dP/dx P(ordered regime) 0.0000 0.0000 0.0000
#> z1 dP/dx P(y = 0) -0.2011 -0.2276 -0.1747
#> z1 dP/dx P(y = 1) 0.1137 0.0940 0.1334
#> z1 dP/dx P(y = 2) 0.0874 0.0724 0.1025
#> z1 dP/dx P(ordered regime) 0.2756 0.2422 0.3090
ame(m, vars = "x1")
#> Average marginal effects (delta-method intervals; derivatives for continuous covariates, discrete changes otherwise)
#> variable contrast component estimate lower upper
#> x1 dP/dx P(y = 0) -0.1149 -0.1385 -0.0912
#> x1 dP/dx P(y = 1) -0.0136 -0.0303 0.0032
#> x1 dP/dx P(y = 2) 0.1284 0.1103 0.1466
#> x1 dP/dx P(ordered regime) 0.0000 0.0000 0.0000
ame(m, vars = "z1", decompose = TRUE)
#> Average marginal effects (delta-method intervals; derivatives for continuous covariates, discrete changes otherwise)
#> variable contrast component estimate lower upper
#> z1 dP/dx P(y = 0) -0.2011 -0.2276 -0.1747
#> z1 dP/dx P(y = 1) 0.1137 0.0940 0.1334
#> z1 dP/dx P(y = 2) 0.0874 0.0724 0.1025
#> z1 dP/dx P(ordered regime) 0.2756 0.2422 0.3090
#> z1 dP/dx P(y = 0: inflation) -0.2756 -0.3090 -0.2422
#> z1 dP/dx P(y = 0: ordered) 0.0745 0.0537 0.0953
ame(m, vars = "z1", stage = "inflation") # through the split equation only
#> Average marginal effects (delta-method intervals; derivatives for continuous covariates, discrete changes otherwise; inflation equation only)
#> variable contrast component estimate lower upper
#> z1 dP/dx P(y = 0) -0.2011 -0.2276 -0.1747
#> z1 dP/dx P(y = 1) 0.1137 0.0940 0.1334
#> z1 dP/dx P(y = 2) 0.0874 0.0724 0.1025
#> z1 dP/dx P(ordered regime) 0.2756 0.2422 0.3090