fit.ols: Fit Simple Mediation Model - Ordinary Least Squares

Description Usage Arguments Details Author(s) See Also Examples

View source: R/fit.ols.R

Description

Fits the simple mediation model using Ordinary Least Squares and returns the indirect effect.

Usage

1
fit.ols(data, minimal = TRUE, std = FALSE)

Arguments

data

n by 3 matrix or data frame. data[, 1] correspond to values for x. data[, 2] correspond to values for m. data[, 3] correspond to values for y.

minimal

Logical. If TRUE, only returns the estimate of the indirect effect ≤ft( \hat{α} \hat{β} \right). If FALSE, returns more information.

std

Logical. Standardize the indirect effect \hat{α}^{\prime} \hat{β}^{\prime} = \hat{α} \hat{β} \frac{\hat{σ}_x}{\hat{σ}_y}.

Details

The fitted simple mediation model is given by

y_i = \hat{δ}_{y} + \hat{\dot{τ}} x_i + \hat{β} m_i + \hat{\varepsilon}_{y_{i}}

m_i = \hat{δ}_{m} + \hat{α} x_i + \hat{\varepsilon}_{m_{i}}

The estimated parameters for the mean structure are

\boldsymbol{\hat{θ}}_{\text{mean structure}} = ≤ft\{ \hat{μ}_{x}, \hat{δ}_{m}, \hat{δ}_{y} \right\} .

The estimated parameters for the covariance structure are

\boldsymbol{\hat{θ}}_{\text{covariance structure}} = ≤ft\{ \hat{\dot{τ}}, \hat{β}, \hat{α}, \hat{σ}_{x}^{2}, \hat{σ}_{\hat{\varepsilon}_{m}}^{2}, \hat{σ}_{\hat{\varepsilon}_{y}}^{2} \right\} .

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other model fit functions: beta_fit.ols_simulation_summary(), beta_fit.ols_simulation(), beta_fit.ols_task_summary(), beta_fit.ols_task(), beta_fit.ols(), beta_fit.sem.mlr_simulation_summary(), beta_fit.sem.mlr_simulation(), beta_fit.sem.mlr_task_summary(), beta_fit.sem.mlr_task(), beta_fit.sem.mlr(), beta_std_fit.sem.mlr_simulation_summary(), beta_std_fit.sem.mlr_simulation(), beta_std_fit.sem.mlr_task_summary(), beta_std_fit.sem.mlr_task(), beta_std_fit.sem.mlr(), exp_fit.ols_simulation_summary(), exp_fit.ols_simulation(), exp_fit.ols_task_summary(), exp_fit.ols_task(), exp_fit.ols(), exp_fit.sem.mlr_simulation_summary(), exp_fit.sem.mlr_simulation(), exp_fit.sem.mlr_task_summary(), exp_fit.sem.mlr_task(), exp_fit.sem.mlr(), exp_std_fit.sem.mlr_simulation_summary(), exp_std_fit.sem.mlr_simulation(), exp_std_fit.sem.mlr_task_summary(), exp_std_fit.sem.mlr_task(), exp_std_fit.sem.mlr(), fit.cov(), fit.sem.mlr(), fit.sem(), mvn_fit.ols_simulation_summary(), mvn_fit.ols_simulation(), mvn_fit.ols_task_summary(), mvn_fit.ols_task(), mvn_fit.ols(), mvn_fit.sem_simulation_summary(), mvn_fit.sem_simulation(), mvn_fit.sem_task_summary(), mvn_fit.sem_task(), mvn_fit.sem(), mvn_mar_10_fit.sem_simulation_summary(), mvn_mar_10_fit.sem_simulation(), mvn_mar_10_fit.sem_task_summary(), mvn_mar_10_fit.sem_task(), mvn_mar_10_fit.sem(), mvn_mar_20_fit.sem_simulation_summary(), mvn_mar_20_fit.sem_simulation(), mvn_mar_20_fit.sem_task_summary(), mvn_mar_20_fit.sem_task(), mvn_mar_20_fit.sem(), mvn_mar_30_fit.sem_simulation_summary(), mvn_mar_30_fit.sem_simulation(), mvn_mar_30_fit.sem_task_summary(), mvn_mar_30_fit.sem_task(), mvn_mar_30_fit.sem(), mvn_mcar_10_fit.sem_simulation_summary(), mvn_mcar_10_fit.sem_simulation(), mvn_mcar_10_fit.sem_task_summary(), mvn_mcar_10_fit.sem_task(), mvn_mcar_10_fit.sem(), mvn_mcar_20_fit.sem_simulation_summary(), mvn_mcar_20_fit.sem_simulation(), mvn_mcar_20_fit.sem_task_summary(), mvn_mcar_20_fit.sem_task(), mvn_mcar_20_fit.sem(), mvn_mcar_30_fit.sem_simulation_summary(), mvn_mcar_30_fit.sem_simulation(), mvn_mcar_30_fit.sem_task_summary(), mvn_mcar_30_fit.sem_task(), mvn_mcar_30_fit.sem(), mvn_mnar_10_fit.sem_simulation_summary(), mvn_mnar_10_fit.sem_simulation(), mvn_mnar_10_fit.sem_task_summary(), mvn_mnar_10_fit.sem_task(), mvn_mnar_10_fit.sem(), mvn_mnar_20_fit.sem_simulation_summary(), mvn_mnar_20_fit.sem_simulation(), mvn_mnar_20_fit.sem_task_summary(), mvn_mnar_20_fit.sem_task(), mvn_mnar_20_fit.sem(), mvn_mnar_30_fit.sem_simulation_summary(), mvn_mnar_30_fit.sem_simulation(), mvn_mnar_30_fit.sem_task_summary(), mvn_mnar_30_fit.sem_task(), mvn_mnar_30_fit.sem(), mvn_std_fit.sem_simulation_summary(), mvn_std_fit.sem_simulation(), mvn_std_fit.sem_task_summary(), mvn_std_fit.sem_task(), mvn_std_fit.sem(), vm_mod_fit.ols_simulation_summary(), vm_mod_fit.ols_simulation(), vm_mod_fit.ols_task_summary(), vm_mod_fit.ols_task(), vm_mod_fit.ols(), vm_mod_fit.sem.mlr_simulation_summary(), vm_mod_fit.sem.mlr_simulation(), vm_mod_fit.sem.mlr_task_summary(), vm_mod_fit.sem.mlr_task(), vm_mod_fit.sem.mlr(), vm_mod_std_fit.sem.mlr_simulation_summary(), vm_mod_std_fit.sem.mlr_simulation(), vm_mod_std_fit.sem.mlr_task_summary(), vm_mod_std_fit.sem.mlr_task(), vm_mod_std_fit.sem.mlr(), vm_sev_fit.ols_simulation_summary(), vm_sev_fit.ols_simulation(), vm_sev_fit.ols_task_summary(), vm_sev_fit.ols_task(), vm_sev_fit.ols(), vm_sev_fit.sem.mlr_simulation_summary(), vm_sev_fit.sem.mlr_simulation(), vm_sev_fit.sem.mlr_task_summary(), vm_sev_fit.sem.mlr_task(), vm_sev_fit.sem.mlr(), vm_sev_std_fit.sem.mlr_simulation_summary(), vm_sev_std_fit.sem.mlr_simulation(), vm_sev_std_fit.sem.mlr_task_summary(), vm_sev_std_fit.sem.mlr_task(), vm_sev_std_fit.sem.mlr()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fit.ols(data = jeksterslabRdatarepo::thirst, minimal = TRUE)
fit.ols(data = jeksterslabRdatarepo::thirst, minimal = TRUE, std = TRUE)
fit.ols(data = jeksterslabRdatarepo::thirst, minimal = FALSE)

taskid <- 1
data <- mvn_dat(taskid = taskid)

fit.ols(data = data, minimal = TRUE)
fit.ols(data = data, minimal = TRUE, std = TRUE)
fit.ols(data = data, minimal = FALSE)

jeksterslabds/jeksterslabRmedsimple documentation built on Oct. 16, 2020, 11:30 a.m.