Announcement

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

  • Type of confidence interval for melogit

    I have a survey-weighted nested random intercept logistic regression. The code is as follows:


    Code:
    svyset occ_group_cat, weight(weight_occ_cat) strata(state_abbr) || occ_cat, weight(weight_occ) strata(state_abbr)  || _n, weight(weight_respondent_rescale) strata(state_abbr) 
    
    
    
    svy: melogit t_tested_14d_dummy b1.gender b1.age_bucket b1.education b1.race_ethnicity b1.state_abbr ///
                                    comorbid_Type1D comorbid_Type2D comorbid_Cancer comorbid_HeartDis comorbid_HighBP ///
                                    comorbid_Asthma comorbid_ChronLungD comorbid_KidneyD comorbid_AutoImm comorbid_WeakImm ///
                                    comorbid_Missing ///
                                    b1.worry_catch_COVID_C9 ///
                                    c.perc_Rep_2020_sc c.incid_prop_7dma_jhu_sc c.PVI_pop_conc_density_sc ///
                                    || occ_group_cat: || occ_cat:, intpoints(2) startgrid(.11) intmethod(mcaghermite) iterate(5000)


    The result for the variance terms on the random intercepts are:


    Click image for larger version

Name:	Screenshot 2023-08-31 185815.jpg
Views:	1
Size:	57.7 KB
ID:	1725681



    My question is, what technique is Stata using to produce the "linearized standard error"? Is it a sandwich estimator?

    This post seems relevant but someone simply said "The way in which they [the CI's] are calculated is too complicated to present here." I don't need a full explanation of how the CI are produced, just a name of the technique so I can understand.

  • #2
    The linearized variance estimator is described in [SVY] Variance estimation.

    Comment


    • #3
      Thank you Jeff, this is a useful document. But I'm still not sure what type of confidence interval (CI) is being used in the case I noted above.

      In the document you shared (page 7), it says one must use the vce(linearized) option - since I didn't put this option in my code, I'm not sure if indeed this is the type of CI referenced in the output.
      Is definitely it the case that the svy:melogit command produces a linearized variance for the CI's on the variance parameters, _b[/var(_cons[occ_group_cat>occ_cat])] and _b[/var(_cons[occ_group_cat])] ?
      Where can I find a document that states this is the case - or is it just inferred from the column heading that reads "Linearized std. err."? I did not find this information in the melogit nor meglm documentation.


      Click image for larger version

Name:	Screenshot 2023-09-06 174102.jpg
Views:	1
Size:	75.5 KB
ID:	1726242


      Comment


      • #4

        The me commands use the log transformation when constructing
        confidence intervals for the variance components.

        Here is an example of how they are constructed. The same method is used with the
        svy prefix.
        Code:
        webuse bangladesh
        melogit c_use i.urban age i.children || district:
        melogit, coeflegend
        
        * critical value
        scalar crit = invnormal(.975)
        * variance component
        scalar b = _b[/var(_cons[district])]
        * it's standard error
        scalar se = _se[/var(_cons[district])]
        * transformed variance component
        scalar logb = log(scalar(b))
        * it's standard error
        scalar logb_se = scalar(se)/scalar(b)
        * CI limits using a normal approximation in the log space
        scalar log_lb = logb - crit*logb_se
        scalar log_ub = logb + crit*logb_se
        * transform back
        scalar lb = exp(log_lb)
        scalar ub = exp(log_ub)
        
        * list hand computed CI limits
        scalar list lb ub
        * list reported CI limits
        di _r_lb[/var(_cons[district])]
        di _r_ub[/var(_cons[district])]

        Comment

        Working...
        X