Hi there,
I am conducting a logistic regression analysis with one binary outcome and 6 categorical covariates and 1 continuous covariate. The data derives from a complex survey design so I have informed stata of this using probability weights, strata and PSUs using svyset.
I have run the fully adjusted logistic regression model and afterwards I have used 'linktest' to assess specification. The _hatsq was non significant, suggesting that the model is specified. However, in order to test the linearity assumption with the continuous covariate (age) I have used restricted cubic splines, followed by a Walds test to determine if there is a non-linear relationship. The Walds test for the cubic splines for age was significant, pointing to a non-linear relationship.
However, when I keep the restricted cubic splines for age in my model, the _hatsq in linktest becomes significant and thus indicating the model is misspecified.
I did also generate a calibration plot for observed vs predicted probabilities and this plot indicated better calibration when restricted cubic splines were used for age.
I am unsure how to proceed from here with this model, if anyone has any guidance or suggestions it would be greatly appreciated.
Many Thanks
I am conducting a logistic regression analysis with one binary outcome and 6 categorical covariates and 1 continuous covariate. The data derives from a complex survey design so I have informed stata of this using probability weights, strata and PSUs using svyset.
I have run the fully adjusted logistic regression model and afterwards I have used 'linktest' to assess specification. The _hatsq was non significant, suggesting that the model is specified. However, in order to test the linearity assumption with the continuous covariate (age) I have used restricted cubic splines, followed by a Walds test to determine if there is a non-linear relationship. The Walds test for the cubic splines for age was significant, pointing to a non-linear relationship.
However, when I keep the restricted cubic splines for age in my model, the _hatsq in linktest becomes significant and thus indicating the model is misspecified.
I did also generate a calibration plot for observed vs predicted probabilities and this plot indicated better calibration when restricted cubic splines were used for age.
I am unsure how to proceed from here with this model, if anyone has any guidance or suggestions it would be greatly appreciated.
Many Thanks
