Dear StataList Community,
I have found myself in a peculiar situation while analyzing survey data for my thesis and would love the advice of you, mes amis, on how best to proceed.
My dataset consists of a survey in which numeric variables track the progress of certain indicators over the course of a treatment. There is treatment group and a control group. The observations for the Treatment Group and Control Group are listed in the same column for Before Treatment and After Treatment.
In other words, one can compare the numerical differences (ex. difference of means) between the treatment group and the control group as "before vs. after."
I ran a series of simple regressions and the results confirmed that over time, only the treatment group experienced a change in each variable outcome.
However, I am hoping to gain more robust results by bootstrapping each regression to have an average regression coefficient over 1000 repetitions (ex. m = 2, so an increase of 2 units for every increase of 1 unit of the treatment). In other words: randomly selecting 50 observations with replacement from the treatment group and control group respectively in the Before Treatment column and in the After Treatment column, and running a regression with those two groups of observations 1000 times.
I am met with r(199) "command _prefix_getmat is unrecognized" error every time, both in trying to manually code the bootstrap regression and when using Stata's bootstrap command.
There is clearly something missing/wrong in my syntax, but I don't understand why Stata can regress these variables with the dummy and not bootstrap them. I have attached a do.file with the code I have tried to develop thus far.
Please don't hesitate to let me know if further clarification is needed.
Merci beaucoup!
I have found myself in a peculiar situation while analyzing survey data for my thesis and would love the advice of you, mes amis, on how best to proceed.
My dataset consists of a survey in which numeric variables track the progress of certain indicators over the course of a treatment. There is treatment group and a control group. The observations for the Treatment Group and Control Group are listed in the same column for Before Treatment and After Treatment.
In other words, one can compare the numerical differences (ex. difference of means) between the treatment group and the control group as "before vs. after."
I ran a series of simple regressions and the results confirmed that over time, only the treatment group experienced a change in each variable outcome.
However, I am hoping to gain more robust results by bootstrapping each regression to have an average regression coefficient over 1000 repetitions (ex. m = 2, so an increase of 2 units for every increase of 1 unit of the treatment). In other words: randomly selecting 50 observations with replacement from the treatment group and control group respectively in the Before Treatment column and in the After Treatment column, and running a regression with those two groups of observations 1000 times.
I am met with r(199) "command _prefix_getmat is unrecognized" error every time, both in trying to manually code the bootstrap regression and when using Stata's bootstrap command.
There is clearly something missing/wrong in my syntax, but I don't understand why Stata can regress these variables with the dummy and not bootstrap them. I have attached a do.file with the code I have tried to develop thus far.
Please don't hesitate to let me know if further clarification is needed.
Merci beaucoup!
Comment