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
ADF test results are nonstationary with constant and trend termHI everyone, I have run the ADF unit root test for my variable "log_CO2" and the result shows that i…
Lasso inference for cox regressionDear STATA team, I hope all is well. I was trying to do lasso inference for survival ,model. The va…
Error with Probit: outcome does not varyDear Statalists, I create a variable = 1 in case of treatment and = 0 in case of no treatment. Then…
convert time variable from; 'Jan 2018' to 'Jan'I want add a time variable that only shows the months in this format; 'Jan', 'Feb', .. So I have 2 t…
How to combine SDC Platinum/ThomsonOne with CRSP?I have a dataset from SDC containing 127 000 M&A bids, including announcement date, year, compan…
Subscribe to:
Post Comments (Atom)
0 Response to Lopping and Saving Results in a Matrix
Post a Comment