FactorHet-class | R Documentation |
Brief descriptions of generic methods (e.g. print, summary) for FactorHet as well as a way to visualize the progress of the model-based optimization.
## S3 method for class 'FactorHet'
plot(x, y = NULL, ...)
## S3 method for class 'FactorHet'
formula(x, ...)
## S3 method for class 'FactorHet'
print(x, fusion.tolerance = 0.001, ...)
## S3 method for class 'FactorHet'
summary(object, show_interactions = FALSE, digits = 3, ...)
## S3 method for class 'FactorHet'
coef(object, coef_type = "beta", ...)
## S3 method for class 'FactorHet'
logLik(object, type = "loglik", ...)
## S3 method for class 'FactorHet'
BIC(object, ...)
## S3 method for class 'FactorHet'
AIC(object, ...)
## S3 method for class 'FactorHet_vis'
print(x, ...)
visualize_MBO(object)
posterior_FactorHet(object)
## S3 method for class 'FactorHet'
vcov(object, phi = TRUE, se.method = NULL, ...)
x |
Model from FactorHet |
y |
Not used; required to maintain compatibility. |
... |
Optional arguments; only used by |
fusion.tolerance |
Threshold at which to declare levels fused |
object |
Object fit using |
show_interactions |
Used by |
digits |
Number of digits to include |
coef_type |
Type of coefficient (beta for treatment effects; phi for moderators) |
type |
For "logLik", should the log-likelihood ( |
phi |
A logical value indicating whether the standard errors from the
moderator parameters, |
se.method |
A string value for the type of standard errors to be
computed. The default, and primary option, is |
The following methods with the arguments given above exist. All
methods work on models with using FactorHet
and
FactorHet_mbo
.
This is a shorthand for cjoint_plot
on a fitted
object.
This returns the underlying formula for the treatment effects and
moderators as a named list. This also returns the values used for group
,
task
, and choice_order
if provided.
This consists of two print
methods.
For FactorHet
, it summarizes the
model and fusion of the factor levels. fusion.tolerance
sets the
threshold at which levels are reported as fused. For outputs of
AME
(and similar), this plots the corresponding plot. See
that documentation for more details.
This summarizes the main effects by group with standard
errors. It is typically more common to visualize this with
cjoint_plot
(and the accompanying data.frame) or AME
.
show_interactions = TRUE
shows the interactions in addition to the
main effects.
This returns the coefficient matrix on the original scale (i.e.
with the sum-to-zero constraints). code_type = "phi"
returns the
moderator coefficients instead of the treatment effect coefficients.
This returns the AIC or BIC. If multiple degrees of freedom options specified, it returns a matrix.
This returns the log-likelihood, log-posterior or sequence of
log-posterior values at each iteration of the algorithm. The argument
"type"
provides more details.
For a model fit with FactorHet_mbo
,
this shows information about the MBO, i.e. proposed values and objectives.
For a model with K > 1
, this visualizes
the posterior for each observation and the posterior predictive implied by
the moderators.
This extracts the estimated variance-covariance matrix of the parameters.
Returns the corresponding output of the generic method. "Details" provides details on the output of each function.
Louis, Thomas A. 1982. "Finding the Observed Information Matrix when Using the EM Algorithm." Journal of the Royal Statistical Society. Series B (Methodological). 44(2):226-233.
Goplerud, Max, Kosuke Imai, and Nicole E. Pashley. 2025. "Estimating Heterogeneous Causal Effects of High-Dimensional Treatments: Application to Conjoint Analysis." arxiv preprint: https://arxiv.org/abs/2201.01357
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.