Skip to content
Back to formatted view

Raw Message

Message-ID: <93d6f2a80902071925n51dc5603vf927fecd829de5b9@mail.gmail.com>
Date: 2009-02-08T03:25:54Z
From: Juliet Hannah
Subject: how to make this qq plot in lattice and/or ggplot2

Hi Group,

Here is some data.

p <- runif(1000) # sample data
groups <- rep(c(1,2),each=500) #conditioning variable
mydata <- cbind(p,groups)
n <- length(p)
u <- (1:n)/(n + 1) # uniform distribution reference for qqplot
logp <- -log(p,base=10)
logu <- -log(u,base=10)
qqplot(logp,logu)

How can I make the above qqplot in lattice and/or ggplot2. The sample
is uniform, and I take -log10. In addition, I would like to use
the group variable to condition. I was not able to get the stat_qq
function in ggplot2 to work.

Thanks for your time.

Regards,

Juliet