Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mediation Analysis with multiple control variables and bootstrap CIs

    Dear Statalist,

    after intensive studying of the available resources online, I am still left with some questions regarding mediation analysis with multiple control variables and bootstrap CIs.
    Note: the following variables are of interest:
    IV: Family_Firm_Identifier
    DV: ROA
    M: Acquisition Frequency
    CV: All other variables that you find below in the code

    I have currently managed to get the following code to run, which uses a fixed effects model with fixed effects for Industry (dSIC and Year Dummy):
    Code:
    capture drop program bootcm
    program bootcm, rclass
    sureg (Acquisition_Frequency Family_Firm_Identifier Founder_Identity FirmAge FirmSize Indebtedness dSIC* Dummy*) (ROA Family_Firm_Identifier Founder_Identity Acquisition_Frequency FirmAge FirmSize Indebtedness dSIC* Dummy*)
    return scalar inds = [Acquisition_Frequency]_b[Family_Firm_Identifier]*[ROA]_b[Acquisition_Frequency]
    return scalar direct = [Acquisition_Frequency]_b[Family_Firm_Identifier]*[ROA]_b[Acquisition_Frequency]
    end
    bootstrap r(inds), reps(5000) nodots: bootcm
    However, if I am not mistaken, this uses the delta method, which, to quote UCLA:
    [...] is based on some pretty strong normal theory assumptions
    . I hence would prefer to run a mediation analysis with control variables with the sem command, however when I use the following code (which is based on
    HTML Code:
    https://stats.idre.ucla.edu/stata/faq/how-can-i-do-mediation-analysis-with-the-sem-command/
    ). I am building on what UCLA suggests:
    If your model contains control variables, i.e., covariates, you must include these in each of the sem equations. Thus, your sem model will look something like this:
    sem (MV <- IV CV1 CV2)(DV <- MV IV CV1 CV2)
    where DV stands for the dependent variable, IV stands for the independent variable, MV stands for the mediator variable, and CVs stand for the covariates.
    Which in my case, looks like this:
    Code:
    sem (Acquisition_Frequency  <- Family_Firm_Identifier Founder_Identity FirmAge FirmSize Indebtedness dSIC* Dummy*)(ROA <- Acquisition_Frequency Family_Firm_Identifier Founder_Identity FirmAge FirmSize Indebtedness dSIC* Dummy*)
    . Stata however, reports an error, namely: model not identified;
    no paths from latent variable ROA to observed variables
    r(503);

    Could anyone tell me what I am overseeing here / would need to do in order to fix it? Very happy about any help!
    Warm regards, John
    Last edited by Jon Hoefer; 05 Feb 2020, 05:25.

  • #2
    Hi Jon,

    This is probably too late for you, but in case anyone else had the same problem this error occurs because your control variables are capitalized and by default STATA assumes that the variables whose first letter are capitalized are latent. You can find more information about this here:
    https://www.stata.com/support/faqs/s...ved-variables/

    Amir

    Comment

    Working...
    X