Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with linktest on logistic regression

    Hello,

    I want to investigate the determinants of job-education mismatches. I ran logistic regress and then the linktest. The_hatsq value is significant, indicating problem with the model specification. My R-squared is also pretty low.

    Y = having mismatch job = 1 and 0 otherwise.
    year = dummies of time = year of survey


    Code:
    logit newmatch i.reg i.area i.sex age i.marital i.edule i.status i.subject i.year
    linktest
    Click image for larger version

Name:	Screenshot 2024-01-12 at 2.56.46 PM.jpg
Views:	1
Size:	259.5 KB
ID:	1739665


    linktest result:

    newmatch Coef. Std. Err. z P>z [95% Conf. Interval]

    _hat .8927595 .0154203 57.90 0.000 .8625363 .9229826
    _hatsq .0897623 .0088951 10.09 0.000 .0723282 .1071964
    _cons -.0569142 .0159678 -3.56 0.000 -.0882105 -.0256179

    I tried to alter my model by adding interaction between variables. However, I still got the significant _hatsq (P = 0.000). Do you have any recommendations on what I should do/ modify with the model?
    Code:
    logit newmatch i.reg i.area i.sex##i.subject c.age##c.age i.marital i.edule i.status i.year
    linktest
    linktest result:

    newmatch Coef. Std. Err. z P>z [95% Conf. Interval]

    _hat .9058087 .0156475 57.89 0.000 .8751401 .9364773
    _hatsq .0752449 .0087495 8.60 0.000 .0580962 .0923935
    _cons -.0460228 .0157786 -2.92 0.004 -.0769483 -.0150973



    Thank you so much in advance .

  • #2
    Sasi:
    1) I'm under the impression that you have too many categorical predictors: this may explain the -linktest- disappointing outcome. I would go for a more parsimonious rtegression specification, run -linktest-, add one predictor at a time till -linktest- outcome, if feasible, does not show a p-value <0.05 for sq_hat;
    2) see the cautionary note about -linktest- after -logit- in Example 3, -linktest- entry, Stata .pdf manual;
    3) as far as the value of the pseudo_R2 is concerned, being high or low depends on its average value is similar researches.
    Last edited by Carlo Lazzaro; 13 Jan 2024, 03:34.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Carlo,

      Thank you so much for your reply; this is very helpful. I followed your 1)recommendation by adding one predictor at a time in logistic regress and it turned out that i.reg i.area i.year generated -linktest- outcome, with a p-value > 0.05 for sq_hat.

      Code:
      logit newmatch i.reg
      logit newmatch i.reg i.area
      logit newmatch i.reg i.area
      logit newmatch i.reg i.area i.year
      I'm not what I should do next. Should I just ignore the results for -linktest- as it may not be sensible to rely on?

      Thank you.

      Comment


      • #4
        Sasi:
        a p-value >0.05 supports the lack of evidence for rejecting the null of -linktest- (the null being: the functional form of the regressand -or, under more general conditions, the whole regression model - is misspecified).
        As there's no evidence of misspecification, go -logit newmatch i.reg i.area i.year-.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment

        Working...
        X