Dear all,
I am running the follwing STATA code from the example from this website: https://stats.idre.ucla.edu/stata/fa...tors-in-stata/
Dataset: use https://stats.idre.ucla.edu/stat/data/hsb2, clear
capture program drop bootmm program bootmm, rclass syntax [if] [in] sureg (read math socst)(write math socst)(science read write math socst) `if' `in' return scalar indread = [read]_b[math]*[science]_b[read] return scalar indwrite = [write]_b[math]*[science]_b[write] return scalar indtotal = [read]_b[math]*[science]_b[read] + /// [write]_b[math]*[science]_b[write] end bootstrap r(indread) r(indwrite) r(indtotal), bca reps(5000) nodots: bootmm
But I am getting the error message
invalid syntax
an error occurred when bootstrap executed bootmm
Could you please tell me what is wrong here?
Related Posts with Mediation sureg
Saving & using multiple scalars to generate new variablesHi all, I am trying to create a new indicator variable based on whether an individual is in the top…
combining retrospective and prospective informationHello all, I have a question please on how to combine retrospective and prospective information usi…
How to let Stata know that one variable contains a panel of countries and the other variable contains just one country?Hi all, I have a panel data set in long-form, where the dependent variable (Y) contains data of 10 …
Generating a row total sum for each time a strpos from the list is foundHi, I am currently working with ICD10 codes and getting stuck on a question I feel like probably has…
Identifying consecutive waves (pre and post event)Hi Statalist, I'm working with a dataset where the variables are collected over about 20 years and …
Subscribe to:
Post Comments (Atom)
0 Response to Mediation sureg
Post a Comment