Stata 15 help for linktest

[R] linktest -- Specification link test for single-equation models


linktest [if] [in] [, cmd_options]

When if and in are not specified, the link test is performed on the same sample as the previous estimation.


Statistics > Postestimation


linktest performs a link test for model specification.


+------+ ----+ Main +-------------------------------------------------------------

cmd_options must be the same options specified with the underlying estimation command, except the display_options may differ.


Setup . sysuse auto

Fit linear regression . regress mpg weight displacement foreign

Perform link test . linktest

Generate new variable, wgt . generate wgt = weight/100

Fit tobit model with right-censoring limit at 2,400 pounds . tobit mpg wgt, ul(24)

Perform link test, specifying right-censoring limit . linktest, ul(24)

Fit quantile regression model . qreg mpg weight displ foreign

Perform link test . linktest

Stored results

linktest stores the following in r():

Scalars r(t) t statistic on _hatsq r(df) degrees of freedom

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index