Skip to content

P-P plot

2 messages · Maura E Monville, Greg Snow

#
Does this give you what you want?

fit <- lm( Petal.Width ~ Petal.Length, data=iris)

tmp1 <- resid(fit)
tmp2 <- pnorm( tmp1, 0, summary(fit)$sigma )

par(mfrow=c(2,1))
qqnorm(tmp1)
qqline(tmp1)

plot( ppoints(length(tmp1)), sort(tmp2), xlab='Theoretical Percentiles',
 ylab='Sample Percentiles')
abline(0,1)


Most people these days prefer the qqplot to the pp plot, the qq-plot
gives more room to the set of points that are generally most
interesting.