-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Computing p-values for svyolr objects #1107
Comments
Could you please rework your reproducible example to use the reprex package? That makes it easier to see both the input and the output, formatted in such a way that I can easily re-run in a local session. Related to #1061. |
Sorry about that! Here you go! library(broom) data(api) m<-svyolr(mealcat~avg.ed+mobility+stype, design=dclus1) broom::tidy(m, conf.int = FALSE, |
Thanks! A slightly more minimal reprex: library(broom)
library(survey)
#> Loading required package: grid
#> Loading required package: Matrix
#> Loading required package: survival
#>
#> Attaching package: 'survey'
#> The following object is masked from 'package:graphics':
#>
#> dotchart
data(api)
dclus1 <- svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)
dclus1 <- update(dclus1, mealcat = cut(meals, c(0, 25, 50, 75, 100)))
m <- svyolr(mealcat ~ avg.ed + mobility + stype, design = dclus1)
tidy(m, p.values = TRUE)
#> Error in UseMethod("extractAIC"): no applicable method for 'extractAIC' applied to an object of class "svyolr" Created on 2022-06-08 by the reprex package (v2.0.1) The I appreciate you noting this! |
Hi Simon, Thanks for responding however I am not sure I understand your answer. Also, I have the latest version of broom (0.8.0, I believe; please let me know if there might be a newer one) but do not see the tidy.svyolr() or tidy.poly() functions. Can you please advise here? Thanks! Grant |
Sure thing— |
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
Hello! I have written on this issue before, but am coming back to it because I do not think it was addressed before. You responded to my comment previously, and I am appreciative and apologize for not responding until now, but I do not think the functionality I was looking for was added.
I am writing to see if it would be possible for you all to assess p-values for svyolr objects. This functionality seems to be missing from the package, and would be invaluable for significance testing for ordinal logistic regression models. Attaching reproducible code for your review:
#######
library(broom)
library(survey)
data(api)
dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
dclus1<-update(dclus1, mealcat=cut(meals,c(0,25,50,75,100)))
m<-svyolr(mealcat~avg.ed+mobility+stype, design=dclus1)
m
broom::tidy(m, conf.int = FALSE,
conf.level = 0.95,
exponentiate = FALSE,
p.values = TRUE)
#Usually provides an error message saying this doesn't run.
Thank you, and please let me know if I can further clarify this request!
Thanks,
gjones1219
The text was updated successfully, but these errors were encountered: