Skip to content
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

classprediction result with cplot.polr #62

Closed
dnbarron opened this issue Apr 18, 2017 · 1 comment
Closed

classprediction result with cplot.polr #62

dnbarron opened this issue Apr 18, 2017 · 1 comment
Assignees
Labels

Comments

@dnbarron
Copy link
Contributor

I get this result when using what = classprediction in cplot.polr.

house.plr <- MASS::polr(Sat ~ Infl + Type + Cont, weights = Freq, data = MASS::housing)
polr.op <- margins::cplot(house.plr, what = 'classprediction')

polr.op
#>    xvals     yvals
#> 1    Low 0.3784493
#> 2 Medium 0.2568264
#> 3   High 0.1436924

I think the issue might be on line 76 of cplot_polr.R. Should that not be:

yvals = outdat[["fitted.class"]])
@leeper leeper added the bug label Apr 19, 2017
@leeper leeper self-assigned this Apr 19, 2017
@leeper leeper closed this as completed in 48569b7 Apr 19, 2017
@leeper
Copy link
Owner

leeper commented Apr 19, 2017

Indeed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants