[R] How to plot

Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.ac.be
Mon Feb 28 10:48:47 CET 2005


you could use directly the plot function on an `lm' object, e.g.,

x <- runif(100, -3, 3)
y <- 1 + 2*x + rnorm(100)
m <- lm(y~x)
par(mfrow=c(2,2))
plot(m)

This doesn't produce the "I Chart" you wanted but it gives a very good 
picture about any strange behaviour of the residuals.

I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: <WeiQiang.Li at seagate.com>
To: <r-help at stat.math.ethz.ch>
Sent: Monday, February 28, 2005 10:35 AM
Subject: [R] How to plot


> 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?
>
>        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
>




More information about the R-help mailing list