I would like to generate permutations of a y var and examine the resulting distribution of p-values for the beta of an x var (specifically, an interaction of two x vars).
My code so far is as follows:
gen interxn=x1*x2, where x2 has multiple levels and I chose to use indicator variables for each term in the regression model below
permute y _b, reps(1000) : regress y x1 x2 i.interxn
This command allows me to see the resulting betas for each predictor in the model, but I would prefer instead to look at the p-values for each beta (as opposed to betas). So is there a way to specify this in the permute command or does one have to do something more complex (apologies if there's an obvious answer to this)?
My code so far is as follows:
gen interxn=x1*x2, where x2 has multiple levels and I chose to use indicator variables for each term in the regression model below
permute y _b, reps(1000) : regress y x1 x2 i.interxn
This command allows me to see the resulting betas for each predictor in the model, but I would prefer instead to look at the p-values for each beta (as opposed to betas). So is there a way to specify this in the permute command or does one have to do something more complex (apologies if there's an obvious answer to this)?
Comment