Hi everyone,
I'm running a hierarchical model to examine predictors for my outcome (yes/no), in a backward stepwise rationale, following this conceptual approach: https://pubmed.ncbi.nlm.nih.gov/9126524/
I have only categorical independent variables with 3-5 categories each, so after run the regression, I used Wald test for each variable to generate an 'overall' p-value and then check if this p-value is less or equal than 0.20 (to decide about retain or not the variable in the final model).
testparm i.[variable]
I am wondering if that is correct or if actually I have to check the p-value for each level/category of the variable, as this can change the decision about retain or not the variable in the final model.
An example bellow - note that based on Wald test I would not retain this variable, but based on individual p-value I would retain it:
Survey: Poisson regression
Number of strata = 1 Number of obs = 4,507
Population size = 1,274,022
Replications = 100
Design df = 99
F(19, 81) = 8.61
Prob > F = 0.0000
----------------------------------------------------------------------------------------
| Jknife *
OUTCOME | Coefficient std. err. t P>|t| [95% conf. interval]
-----------------------+----------------------------------------------------------------
|
independent_variable_1 |
2 | .1107948 .1343242 0.82 0.411 -.1557337 .3773232
3 | .0821731 .1372108 0.60 0.551 -.1900828 .3544291
4 | .2458391 .120644 2.04 0.044 .0064551 .485223
5 | .1734045 .1234669 1.40 0.163 -.0715806 .4183896
----------------------------------------------------------------------------------------
. testparm i.independent_variable_1
Adjusted Wald test
( 1) [kidwhtR_high]2.q_pca_upp = 0
( 2) [kidwhtR_high]3.q_pca_upp = 0
( 3) [kidwhtR_high]4.q_pca_upp = 0
( 4) [kidwhtR_high]5.q_pca_upp = 0
F( 4, 96) = 1.34
Prob > F = 0.2596
I'm running a hierarchical model to examine predictors for my outcome (yes/no), in a backward stepwise rationale, following this conceptual approach: https://pubmed.ncbi.nlm.nih.gov/9126524/
I have only categorical independent variables with 3-5 categories each, so after run the regression, I used Wald test for each variable to generate an 'overall' p-value and then check if this p-value is less or equal than 0.20 (to decide about retain or not the variable in the final model).
testparm i.[variable]
I am wondering if that is correct or if actually I have to check the p-value for each level/category of the variable, as this can change the decision about retain or not the variable in the final model.
An example bellow - note that based on Wald test I would not retain this variable, but based on individual p-value I would retain it:
Survey: Poisson regression
Number of strata = 1 Number of obs = 4,507
Population size = 1,274,022
Replications = 100
Design df = 99
F(19, 81) = 8.61
Prob > F = 0.0000
----------------------------------------------------------------------------------------
| Jknife *
OUTCOME | Coefficient std. err. t P>|t| [95% conf. interval]
-----------------------+----------------------------------------------------------------
|
independent_variable_1 |
2 | .1107948 .1343242 0.82 0.411 -.1557337 .3773232
3 | .0821731 .1372108 0.60 0.551 -.1900828 .3544291
4 | .2458391 .120644 2.04 0.044 .0064551 .485223
5 | .1734045 .1234669 1.40 0.163 -.0715806 .4183896
----------------------------------------------------------------------------------------
. testparm i.independent_variable_1
Adjusted Wald test
( 1) [kidwhtR_high]2.q_pca_upp = 0
( 2) [kidwhtR_high]3.q_pca_upp = 0
( 3) [kidwhtR_high]4.q_pca_upp = 0
( 4) [kidwhtR_high]5.q_pca_upp = 0
F( 4, 96) = 1.34
Prob > F = 0.2596

Comment