-
Notifications
You must be signed in to change notification settings - Fork 2
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
Different Quantiles #7
Comments
I don't think library(gglorenz) q <- quantile(billionaires$TNW, seq(0, 1, 0.1)) q$q <- cumsum(q$q)/sum(q$q) ggplot(q, aes(x=n,y=q)) +geom_path() |
Thanks Hernando for the solution. Why I preferred "gglorenz" was that I
could have got the shaded region between line of equality and lorenz
curve!! Is there a solution to do this too?
Thanks and Regards,
Nithin
…On Sat, Sep 19, 2020 at 10:48 AM Hernando Cortina ***@***.***> wrote:
I don't think gglorenz package can help you with this. But you could try
something like this:
`library(gglorenz)
data("billionaires")
q <- quantile(billionaires$TNW, seq(0, 1, 0.1))
q <- as.data.frame(q)
q$n <- as.numeric(sub("%","", rownames(q)))/100
q$q <- cumsum(q$q)/sum(q$q)
ggplot(q, aes(x=n,y=q)) +geom_path()`
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APQKHSZHZX6WYSM5DKQ2AUTSGQ5LBANCNFSM4RPAM5CQ>
.
|
|
Thanks hernando :)
…On Sat, Sep 19, 2020 at 7:02 PM Hernando Cortina ***@***.***> wrote:
ggplot(q, aes(x=n,y=q)) +geom_path() +geom_polygon()
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APQKHS4XHYINTVEEJR55O7LSGSXGTANCNFSM4RPAM5CQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can the plot be made with different quantiles? say 20% or with 10% bins?
The text was updated successfully, but these errors were encountered: