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
Generate variables with forvalsHello Statalist, I have a dataset which contains the following variables: firm (every firm has an as…
Dipendent Double-Sorting 25 PortfoliosDear all, I am struggling to replicate the FF-25 portfolios with a variant, I should employ a depend…
traj command with hierarchical data structureI'm interested in using the user-written traj command (link below) to identify latent trajectories o…
Interaction between variables changes the results fundamentally!Dear All, I would appreciate your help on the following please: The correlation between y and x1 x2 …
Cluster Randomized Controlled TrialI have a question about the Cluster Randomized Controlled Trial. Is it recommended to perform the sv…
Subscribe to:
Post Comments (Atom)
0 Response to Lopping and Saving Results in a Matrix
Post a Comment