Dear All,
I am trying to run the following code:
However, Stata replies:
I cannot figure out where the mistake is. Any hint?
Thanks in advanced for your kind help.
Dario
I am trying to run the following code:
Code:
cap program drop myboot
cap drop fitted imr
program define myboot, eclass
preserve
syntax [if] [in]
probit credits_dummy $instruments log_isee1 if female == `i'
predict double fitted`i', xb
gen double imr`i' = normalden(fitted`i') / normal(fitted`i')
ivreg2 std_gpa (autonuni=$instruments) imr`i' if female == `i', cluster(cds) endog(autonuni)
matrix b`i'=e(b)
ereturn post b`i'
ereturn local cmd="bootstrap"
end
forvalues i=0/1{
bootstrap _b`i', seed(12345) reps(500): myboot
est store heck`i'
}
Code:
invalid syntax an error occurred when bootstrap executed myboot
Thanks in advanced for your kind help.
Dario

Comment