Guest User

Untitled

a guest
Feb 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. > fmla = 'status_id~ratings'
  2. > logisticmodel <- glm(fmla, data = playdata, family=binomial(link="logit"))
  3.  
  4. > str(playdata)
  5.  
  6. 'data.frame': 24160 obs. of 13 variables:
  7. $ idd : int 57251659 63385939 51939145 64339389 33725679 47000250 62738883 33725679 53589441 36670488 ...
  8. $ status_id : int 1 1 1 1 1 1 1 1 1 1 ...
  9. $ id : int 22820543 22953283 22919397 22699949 22658030 22720403 22581860 22915483 22621108 22651736 ...
  10. $ group_id : int 2 2 2 2 2 2 2 2 2 2 ...
  11. $ created_date : POSIXct, format: "2017-03-31 12:45:10" "2017-04-04 10:50:11" "2017-04-03 16:40:04" "2017-03-28 14:40:48" ...
  12. $ question_id : int 20073221 20219031 20185301 19948471 19906458 18651404 19816152 20175471 19865888 19897662 ...
  13. $ surftoanswertime: int 533 484 98 476 388 0 741 757 2222 381 ...
  14. $ skiprate : num 0.981 0.95 0.993 0.875 0.966 ...
  15. $ ratings :integer64 0 0 1 2 0 0 1 1 ...
  16. $ pos :integer64 0 0 1 2 0 0 1 0 ...
  17. $ negratings :integer64 0 0 0 0 0 0 0 1 ...
  18. $ cf : num NA NA 1 1 NA NA 1 0 NA 1 ...
  19. $ cf1 : num -1 -1 1 1 -1 -1 1 0 -1 1 ...
  20.  
  21. fmla = 'status_id~skiprate+ratings+negratings+surftoanswertime+cf1'
  22.  
  23. > logisticmodel <- glm(fmla, data = playdata, family=binomial(link="logit"))
  24. Error in names(coef) <- xnames : names() applied to a non-vector
  25. In addition: Warning messages:
  26. 1: In glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, :
  27. non-finite coefficients at iteration 1
  28. 2: glm.fit: algorithm did not converge
Add Comment
Please, Sign In to add comment