0

I am trying to run a logit model to see if there is a link to debris found in turtles and other variables. I have tried using both of the codes below and found that my output lists each different variable and not variable type:

model <- glm(debris ~., family=binomial(link='logit'),data=turtles)
summary(model)

mylogit <- glm(debris ~ sex + species + age, data = my data, family = “binomial”)
summary(mylogit)


----------
sexm          0.09759    0.10874   0.897  0.36945    
sexUNK       -0.24675    0.08839  -2.792  0.00525 ** 
agecalf     -11.52421  324.74385  -0.035  0.97169    
agejuv        0.36566    0.31570   1.158  0.24676    
ageUNK       -0.36980    0.31378  -1.179  0.23858    
speciesCM     1.15422    0.27601   4.182 2.89e-05 ***
speciesDC     1.13929    0.72239   1.577  0.11477    
speciesEI     1.67397    0.33718   4.965 6.88e-07 ***
speciesLO    -0.91502    0.63666  -1.437  0.15066    
speciesUNK  -10.36999  324.74383  -0.032  0.97453 

When I want them to be confined to the variable (i.e., sex, age...) because I have some categories with a lot of different classifications.

I am assuming that I have done something wrong with prepping my data or is there a part of the code I am missing or need to get rid of.

Heroka
  • 12,889
  • 1
  • 28
  • 38
  • I think the issue might be a misunderstanding of how models work. For categorical variables like you have, you get coefficients for each level of the variable (except the first one). This is expected. – Heroka Mar 19 '16 at 12:02
  • Okay, I understand now. But when I went to add in other variables I got a much larger output obviously, but now none of them (even the ones above) are marked as significant.. Why would this happen? – Hannah Grace McDonald Mar 19 '16 at 12:20
  • Because you're data dredging? Because your dataset isn't large enough? Because you need better categorizations? You might do better on Cross Validated, as this is not a programming question per se. – Heroka Mar 19 '16 at 12:27

0 Answers0