Announcement

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

  • controll for linearily in a logistic model without any integer variable

    Hello,

    I want to do a logistic regression
    Code:
    logistic Evermigrated men05 Under30 Over60 i.born_in_capital Under30#i.born_in_capital Over60#i.born_in_capital married05 widowed05 livingwithfather05 livingwithmother05
    everbeentoschool05 currentlyinschool05 pca_indexlivingstandard05 savingsaccount05 borrowingability05
    Householdmembers05 shock05 logconsumptionsumtotal05 illness05  
    Ethnic11_Bantu Ethnic11_Niloten Ethnic11_Hamitoniloten Ethnic11_Sudansprachengruppen Ethnic11_Banyakole
    , where most of the values are dummies and only two varibales logconsumptionsumtotal05 and pca_indexlivingstandard05 , but also not integer. Since I wanna control for linearity I think I need a linear variabel like age or time to do the margins and marginsplot command. I´ve already read about the clogit command, which should be better for many dummy variables, but I don´t no how to specify my group (which is recommanded in clogit).
    I´ve tried the code
    Code:
    clogit Evermigrated men05 Under30 Over60 i.born_in_capital Under30#i.born_in_capital Over60#i.born_in_capital married05 widowed05 livingwithfather05 livingwithmother05
    everbeentoschool05 currentlyinschool05 pca_indexlivingstandard05 savingsaccount05 borrowingability05
    Householdmembers05 shock05 logconsumptionsumtotal05 illness05  
    Ethnic11_Bantu Ethnic11_Niloten Ethnic11_Hamitoniloten Ethnic11_Sudansprachengruppen Ethnic11_Banyakole, group(HHID)
    But if I use this "natural" identifier HHID (In my Data set), many of my variables are omitted and more dann 3000 of 6000 observations could not be used.

    Thanks for your ideas and support



  • #2
    Can you maybe tell me, whether my question is too easy, too difficult or I´m not precise enough

    Comment


    • #3
      Jay:
      some remarks about your post:
      -I'm not clear about what you're meaning by controlling for linearity. Besides, assuming that you need age or time for your research purposes, the question rests on whether or not these variables are available (and you are the only one who can answer to this question).
      - it's difficult to advice you on how your group[s?] should be specified since you do not report the aim of your research. The only recommendation that springs to my mind is to check again -clogit- entry in Stata 13.1 .pdf manual;
      - I don't know what is the "natural" identifier in your Data set. Moreover you do not report which (if any) message Stata gave you back when more that 3000 out of 6000 observations are omitted from the regression model.

      Reposting your query following FAQ guidances on how to post effectively would probably increase your chance of getting helpful replies.

      Kind regards,
      Carlo
      Kind regards,
      Carlo
      (Stata 18.0 SE)

      Comment

      Working...
      X