[R] How to plot

Petr Pikal petr.pikal at precheza.cz
Mon Feb 28 10:55:01 CET 2005



On 28 Feb 2005 at 17:35, WeiQiang.Li at seagate.com wrote:

> Hello,
> 
>         I would like to know if R provides the similar function to
>         produce 
> the 4-in-1 graph ("Normal Plot of Residuals", "I Chart of Residuals",
> "Histogram of Residuals" & "Residuals vs Fits") as MiniTab. If do not
> have, could anyone please tell me how to produce above-mentioned
> individual chart?

Hi

> x<-rnorm(10)
> y<-10*x+5+rnorm(10)
> plot(x,y)
> fit<-lm(y~x)
> par(mfrow=c(2,2))
> qqnorm(resid(fit))
> hist(resid(fit))
> plot(fitted(fit),resid(fit))
>

for three plots. You can try to construct I Chart yourself. Go 
through help page of lm and you can find some other options how to 
plot your lm result.

Cheers
Petr








> 
>         Your help is greatly appreciated.
> 
> Best Regards,
> WeiQiang Li
> 
>  [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list