Dear Statalist community!
To increase speed of a bootstrapping program, I tried out the "paralell" modul (https://github.com/gvegayon/parallel). Unfortunately, I get weird error message when trying to run parallel in my setting. Its most probably a very simple problem, but I cannot figure out. Any help is highly appreciated.
My Stata version: 15.1
I installed "paralell" modul as indicated on Github:
ssc install parallel, replace
parallel setclusters 4, f
***************************************
My do-file:
est clear
global variab "laborforce "
This here is my "program":
capture program drop bivprobit_boot
program bivprobit_boot, rclass
set more off
*the following four lines refer to macros that I use to run the biprobit model
foreach var in $variab{
foreach bw in obw {
foreach per in per_base`var'`bw' {
foreach ff in per_ff`var'`bw'{
*baseline model
biprobit (`var' = takeup $`ff' i.year ) (takeup = i.treat $`ff' i.year ) if $`per', cluster (hhid)
eststo base`var'_`bw'
*predict
predict x1b1hat , xb1
gen x1b1hat0 = x1b1hat- _b[takeup]*takeup
gen x1b1hat1 = x1b1hat0 + _b[takeup]
gen pe1 = normal(x1b1hat1) - normal(x1b1hat0)
summarize pe1
return scalar ape1= r(mean)
drop x1b1hat x1b1hat0 x1b1hat1 pe1
}
}
}
}
end
Here starts the actual bootstrapping. When trying to run this I get the error message....
foreach var in $variab {
*bootstrapping
parallel bs r(ape1), reps(50) seed(123): bivprobit_boot
eststo bootstr`var'obw
}
***********************************
Stata output:
. foreach var in $variab {
2. *bootstrapping
. parallel bs r(ape1), reps(50) seed(123): bivprobit_boot
3. eststo bootstr`var'obw
4. }
invalid 'reps'
r(198);
***********************************
Does anyone have an idea what the problem could be?
I'd appreciate this a lot!
Best,
Johanna
Related Posts with Problem with "paralell" module when bootstrapping
Unit Root CircleHi guys, I am currently doing a task, I am not really familiar with and I do need your help. It sa…
Using psmatch2 for panel dataDear Statalisters, I am using balanced panel data where the panel variable is country and the time v…
frame post not working after last updateHas anyone else noticed their code using frame post is now not working? I had code like below that w…
Summarized Statistics Table with t-test for difference in meansDear Statalisters, I would like to get the following table for my summarized statistics. However, I…
Generate dummies from list of stringsDear STATAlisters, I have a string variable that tells me what insurances are accepted by individua…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with "paralell" module when bootstrapping
Post a Comment