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. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Maura E Monville > Sent: Friday, September 28, 2007 1:17 PM > To: [EMAIL PROTECTED] > Subject: [R] P-P plot > > Sorry for my silly questions. I'm a beginner with R and most > statistics concepts. > I carried out a simple linear regression where the dependent > variable is explained through a combination of powers of > cos(independent variable). > I can see R returned a good R^2 factor (> 0.99) but I have a > hard time at interpreting all the other info that R prints > out by using summary( regression.results), > residuals(regression.results), anova(regression.results), > > plot(regression.results). > I know sometimes R^2 might be misleading .. > > I see that R provided a Q-Q plot by default. > Is it possible to get a P-P plot ? I searched for that but > did not get anywhere ... > > Thank you in advance. > Best regards, > > -- > Maura E.M > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.