Hi everyone,
I'm trying to a run a simple regression with five variables of interest. The primary interest is a dummy variable created using the average of another variable. What I want to do is to check if the result is 'robust'.
So let's say the regression I am running is: y = B0 + B1X1 + B2X2 + B3X3 + B4X4 + B5X5 + error. X2 is the variable that is the dummy variable based on another variable, Z. What I want to do is to run regressions in which X2 takes every value (average of Z) +/- x (some small number). Hence, I want to check is B2 is still significant if the value of X2 differs somewhat.
To do this, I'm thinking of running a loop and saving the p value of each regression in a matrix. Then I can just look at the matrix and if most of the step is greater than 0.05, then I know that the result I got was a fluke.
Does this make sense? How would I be able to get the p-value post command and save one by one in a loop in a matrix?
Thank you so much!
Related Posts with Lopping and Saving Results in a Matrix
Resetting mlibs in running StataHi I'm building some mata code in which parts must be saved in Stata versions 12, 13, 14, or 15. Bas…
Psmatch and questions about itHi, I would like to investigate the effects of a natural disaster on individuals. Therefore I have …
Generating status variable for firmDear Statalist users, I have panel data for firms involved in international trade. t1 is my variabl…
How to draw two base lines using coefplot command on stata.Hey! I'm trying to create a graph similar to the one attached with this post. I have two problems: 1…
Converting week to dateHi there, I'm currently working on a data that consist of 'date of birth' and 'gestational age' in …
Subscribe to:
Post Comments (Atom)
0 Response to Lopping and Saving Results in a Matrix
Post a Comment