Announcement

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

  • Weighted database regression analyses

    Dear Stata List,

    I'm having trouble completing a weighted linear regression model using NHANES data, that's previously not been problematic.

    My code (which usually works) is

    Code:
    svyset psu [pweight=exam_wts], strata(stratum) vce(linearized)
    svy:regress vis_difficulty_score_7 i.MD_3level
    , however, I'm getting the following error message:

    Code:
    no; data are mi set
        Use mi svyset to set or query these data; mi svyset has the same syntax as svyset.
    
        Perhaps you did not type svyset.  Some commands call svyset to obtain information
        about the settings.  In that case, that command is not appropriate for running
        directly on mi data.  Use mi extract to select the data on which you want to run
        the command, which is probably m=0.
    r(119);
    I have previously run correlation matrices, factor analysis and IRT (with imputed data, and _mi_m, _mi_id, and _mi_miss variables - which seem to be causing the problem)..

    If anyone had any experience using weighted national database data, and how to troubleshoot this problem, I would really appreciate any advice. Thanks very much for your consideration.

    Will

  • #2
    Dear Stata List,

    If it helps at all: I have found a document by Yulia Marchenko from 2010, which outlines using the mi estimate commands for multiple imputations (which I may be running in to?); which I have tried -

    Code:
    mi svyset psu [pweight=exam_wts], strata(stratum) vce(linearized)
    
    mi estimate: svy: regress vis_difficulty_score_7 i.MD_3level
    But unfortunately with this initial output:

    Code:
         
    pweight: exam_wts
    VCE: linearized
    Single unit: missing
    Strata 1: stratum
    SU 1: psu
    FPC 1: <zero>
    I get this subsequent error message:

    Code:
    no imputations
    r(2000);
    If anyone has any advice, it would be really great. Thanks again for looking.
    William

    Comment

    Working...
    X