
Path Model Function
path_model.RdFit path or latent-variable models to a synthesized correlation matrix and optionally propagate uncertainty from the meta-analytic synthesis into the path coefficients.
Usage
path_model(
mars_object,
model,
num_obs = NULL,
adjust_se = TRUE,
se_method = c("delta", "simulation", "bootstrap"),
se_draws = 1000,
se_seed = NULL,
method_null = "sem",
synthesis_method = c("model", "average", "weighted"),
synthesis_transform = c("none", "fisher_z"),
missing_corr = c("available", "pairwise", "em"),
attenuation = c("none", "correct"),
reliability = NULL,
reliability_missing = c("error", "skip", "impute_mean", "assume_1"),
pd_adjust = c("none", "eigen_clip", "nearpd"),
pd_tol = 1e-08,
...
)Arguments
- mars_object
The mars fitted object, or an object returned by
mixed_corr_meta.- model
Model syntax in a lavaan-like format. Regression paths use
~, latent measurement paths use=~, and residual variances or covariances use~~.- num_obs
Number of observations. For objects returned by
mixed_corr_meta, supply this explicitly if you want chi-square/RMSEA-style fit statistics; otherwise those statistics are reported as unavailable because the mixed-correlation workflow does not imply a defensible SEM sample size by default.- adjust_se
Logical; if
TRUE, compute standard errors that reflect uncertainty in the synthesized correlation matrix when supported byse_method.- se_method
Method used for standard errors.
"delta"uses the current delta-method approximation,"simulation"uses parametric draws from the pooled correlation vector, and"bootstrap"uses available bootstrap correlation draws when present.- se_draws
Number of draws/resamples used when
se_method = "simulation"or"bootstrap".- se_seed
Optional random seed for
se_method.- method_null
Null-model method for observed-variable path models. Currently
"sem"uses the SEM-style independence model implemented bymodel_fit. Latent-variable models use their internal independence-model calculation and ignore this argument.- synthesis_method
Correlation synthesis method used to build the matrix supplied to latent/path modeling. One of
"model"(default, use the fitted MARS coefficients),"average", or"weighted".- synthesis_transform
Optional transform applied for
"average"/"weighted"pooling. One of"none"or"fisher_z".- missing_corr
Missing-correlation handling for synthesized matrices. One of
"available"(fallback to model-estimated pair),"pairwise"(pairwise pooling with simple fill for absent pairs), or"em"(EM-style matrix completion).- attenuation
Attenuation-correction mode for synthesized correlations. One of
"none"or"correct".- reliability
Reliability input used when
attenuation = "correct". Accepts either a named numeric vector by variable or a data frame with variable/reliability columns (optionally with a study column).- reliability_missing
Strategy for missing reliability values. One of
"error","skip","impute_mean", or"assume_1".- pd_adjust
Positive-definite repair applied to the synthesized correlation matrix prior to model fitting. One of
"none","eigen_clip", or"nearpd".- pd_tol
Minimum eigenvalue tolerance used by
pd_adjust = "eigen_clip".- ...
Reserved for future extensions.
Value
List output with class path; The output is the parameter estimates from the fitted path model.
Details
path_model() first extracts or constructs a pooled correlation matrix
from mars_object. With the default synthesis_method = "model",
this matrix is assembled from the fitted MARS coefficients; alternatively,
the matrix can be formed by average or weighted pooling with optional
Fisher-z transformation, missing-correlation handling, attenuation
correction, and positive-definite adjustment.
The fitted path model is then delegated to model_fit. For
observed-variable regression syntax, path coefficients are computed directly
from the relevant submatrices of the synthesized correlation matrix. For
latent-variable or covariance syntax, model_fit() minimizes the normal
theory SEM discrepancy function for the observed correlation matrix using
optim with the BFGS method. Variance parameters are
optimized on the log scale, fixed parameters supplied with
value * variable are held fixed, and unscaled latent factors receive a
marker loading of one.
Model fit statistics are calculated from the fitted implied correlation matrix. Observed-variable models use the package's GLS-style discrepancy and SEM-style null model; latent-variable models use the maximum-likelihood discrepancy \(\log|\Sigma(\theta)| + \mathrm{tr}(R\Sigma(\theta)^{-1}) - \log|R| - p\). In both cases, CFI, TLI, RMSEA, and SRMR are reported with raw values retained when bounded display values are clipped.
Examples
if (FALSE) { # \dontrun{
fit <- mars(
data = becker09,
studyID = "ID",
effectID = "numID",
sample_size = "N",
effectsize_type = "cor",
varcov_type = "weighted",
variable_names = c(
"Cognitive_Performance",
"Somatic_Performance",
"Selfconfidence_Performance",
"Somatic_Cognitive",
"Selfconfidence_Cognitive",
"Selfconfidence_Somatic"
)
)
path_model(fit, "Performance ~ Cognitive + Somatic + Selfconfidence")
} # }