Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > fmla = 'status_id~ratings'
- > logisticmodel <- glm(fmla, data = playdata, family=binomial(link="logit"))
- > str(playdata)
- 'data.frame': 24160 obs. of 13 variables:
- $ idd : int 57251659 63385939 51939145 64339389 33725679 47000250 62738883 33725679 53589441 36670488 ...
- $ status_id : int 1 1 1 1 1 1 1 1 1 1 ...
- $ id : int 22820543 22953283 22919397 22699949 22658030 22720403 22581860 22915483 22621108 22651736 ...
- $ group_id : int 2 2 2 2 2 2 2 2 2 2 ...
- $ 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" ...
- $ question_id : int 20073221 20219031 20185301 19948471 19906458 18651404 19816152 20175471 19865888 19897662 ...
- $ surftoanswertime: int 533 484 98 476 388 0 741 757 2222 381 ...
- $ skiprate : num 0.981 0.95 0.993 0.875 0.966 ...
- $ ratings :integer64 0 0 1 2 0 0 1 1 ...
- $ pos :integer64 0 0 1 2 0 0 1 0 ...
- $ negratings :integer64 0 0 0 0 0 0 0 1 ...
- $ cf : num NA NA 1 1 NA NA 1 0 NA 1 ...
- $ cf1 : num -1 -1 1 1 -1 -1 1 0 -1 1 ...
- fmla = 'status_id~skiprate+ratings+negratings+surftoanswertime+cf1'
- > logisticmodel <- glm(fmla, data = playdata, family=binomial(link="logit"))
- Error in names(coef) <- xnames : names() applied to a non-vector
- In addition: Warning messages:
- 1: In glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, :
- non-finite coefficients at iteration 1
- 2: glm.fit: algorithm did not converge
Add Comment
Please, Sign In to add comment