You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A general specification test mainly for functional form, extends easily to GLM and other models, either with an auxiliary regression or a variable addition score test.
similar to link_test #1479
"""
To be honest, I think Stata does a really poor job with these tests (I hope someone from StataCorp reads this!). There are several points to be made here:
As far as I understand, -ovtest- is a RESET test. Therefore it is a check of the correct specification of the conditional mean; conditioning on the set of variables being used. Therefore, it is not a test for omitted variables as the name suggests; this is very confusing and that may explain Rich's comment in qqplot #2.
The particular form of the RESET that is implemented in -ovtest- does not allow the user to choose the number of powers to include and does not allow the use of robust standard errors. These are serious limitations.
Form what I read in the manual, -linktest- is a simplified version of the RESET. It allows the use of robust standard errors but the number of powers is again fixed. However, it is not a true RESET test and I guess it will have less power; to put it differently, I am not aware of any optimal properties for this form of the test.
More important, I find it shocking that the manual says that it is a test of the specification of the dependent variable. The choice of dependent variable is dictated by the substantial question that we are interested in; no statistical test can check that!
Given the drawback of these procedures, I suggest that you simply run the RESET "by hand", using a suitable number of powers (just squares or squares and cubes) and with appropriate standard errors.
""
Joao Santos Silva
Activity
josef-pkt commentedon Dec 3, 2018
There are some other issues on variable addition score tests, e.g. #3916
a comment from the Stata list on ovtest versus linktest
https://www.statalist.org/forums/forum/general-stata-discussion/general/1342616-linktest-and-ovtest-produce-conflicting-results
"""
To be honest, I think Stata does a really poor job with these tests (I hope someone from StataCorp reads this!). There are several points to be made here:
As far as I understand, -ovtest- is a RESET test. Therefore it is a check of the correct specification of the conditional mean; conditioning on the set of variables being used. Therefore, it is not a test for omitted variables as the name suggests; this is very confusing and that may explain Rich's comment in qqplot #2.
The particular form of the RESET that is implemented in -ovtest- does not allow the user to choose the number of powers to include and does not allow the use of robust standard errors. These are serious limitations.
Form what I read in the manual, -linktest- is a simplified version of the RESET. It allows the use of robust standard errors but the number of powers is again fixed. However, it is not a true RESET test and I guess it will have less power; to put it differently, I am not aware of any optimal properties for this form of the test.
More important, I find it shocking that the manual says that it is a test of the specification of the dependent variable. The choice of dependent variable is dictated by the substantial question that we are interested in; no statistical test can check that!
Given the drawback of these procedures, I suggest that you simply run the RESET "by hand", using a suitable number of powers (just squares or squares and cubes) and with appropriate standard errors.
""
Joao Santos Silva
josef-pkt commentedon Dec 3, 2018
related #1479 link test with example using new score_test
josef-pkt commentedon Dec 31, 2019
not clear to me right now (I don't remember)
In GLM and discrete with variable augmentation reset test
Do we use powers of fittedvalues (predicted endog) or of the linear prediction
linpred?(I used fittedvalues in my uncommitted code, but maybe it should be linpred, or optionally both?)
(another thought: we could also use WLS to check locally with the augmented model keeping weights at the "null", i.e. original specification.)
josef-pkt commentedon Oct 3, 2020
Lipsitz, Stuart R., Garrett M. Fitzmaurice, and Geert Molenberghs. 1996. “Goodness-of-Fit Tests for Ordinal Response Regression Models.” Journal of the Royal Statistical Society. Series C (Applied Statistics) 45 (2): 175–90. https://doi.org/10.2307/2986153.
uses a binned indicator function in score or wald test for variable addition as gof test
that's close or identical to what I have in my reset code
Fagerland, Morten W., and David W. Hosmer. 2016. “Tests for Goodness of Fit in Ordinal Logistic Regression Models.” Journal of Statistical Computation and Simulation 86 (17): 3398–3418. https://doi.org/10.1080/00949655.2016.1156682.
compare 3 approaches for gof testing including Lipsitz et al
Fagerland, Morten W., and David W. Hosmer. 2017. “How to Test for Goodness of Fit in Ordinal Logistic Regression Models:” The Stata Journal, September. https://doi.org/10.1177/1536867X1701700308.
describes Stata user function for gof including
Wald-LipsitzLR-Lipsitz.josef-pkt commentedon Oct 28, 2021
??? still no comment about where my code is :(
#1479 (comment)
has link to https://gist.github.com/josef-pkt/f20abdbd360c2e549f73e98844f5d2c4
I don't remember where my functions for exog_to_test construction are.