Core worker used by projoint to compute marginal means (MMs)
or average marginal component effects (AMCEs) under either the profile- or
choice-level structure. Handles IRR usage (estimated or fixed) and the
requested standard-error method.
projoint_level(
.data,
.qoi,
.structure,
.estimand,
.se_method,
.irr,
.remove_ties,
.ignore_position,
.n_sims,
.n_boot,
.weights_1,
.clusters_1,
.se_type_1,
.weights_2,
.clusters_2,
.se_type_2,
.auto_cluster = TRUE,
.seed = NULL
)A projoint_results object containing:
estimates: tibble of estimates (point estimate, SE, CI) with
identifier columns (e.g., att_level_*).
estimand: "mm" or "amce".
structure: "profile_level" or "choice_level".
se_method: SE computation method used.
irr: character noting IRR usage (e.g., "Estimated" or
"Assumed (<value> )").
tau: numeric \(\tau\) used to correct measurement error.
remove_ties, ignore_position: flags echoed from inputs.
se_type_used, cluster_by: details propagated from
fitting calls (if available).
labels, data: design labels and the analysis data
passed through for downstream methods.
A projoint_data object.
Optional projoint_qoi; if NULL, estimates all
MMs/AMCEs implied by the design. When supplied, overrides .structure
and .estimand.
Either "profile_level" or "choice_level".
Either "mm" (marginal mean) or "amce" (average
marginal component effect).
One of "analytical", "simulation", or
"bootstrap".
NULL to estimate IRR from repeated tasks; numeric to fix IRR.
Logical; whether to drop tied responses (default TRUE).
Logical; choice-level only. Ignore left/right position?
Default TRUE.
Integer; required when .se_method = "simulation".
Integer; required when .se_method = "bootstrap".
Arguments passed to
lm_robust for IRR estimation. If .se_type_1
is NULL, estimatr defaults are used.
Arguments passed to
lm_robust for MM/AMCE estimation. If .se_type_2
is NULL, estimatr defaults are used.
Logical; if TRUE (default) and an id column
is present while no clusters are provided, cluster automatically. Only applied
when the corresponding .se_type_* is NULL.
Optional integer; if supplied, sets a temporary RNG seed for simulation/bootstrap and restores prior state on exit.
projoint, pj_estimate, organize_data,
projoint_results