Hello, I am interested in plotting my regression analysis results(regression coefficients and standard errors obtained through OLS and Tobit models) in the form of graphs.What is the best way to accomplish this? Thanks. Murali Kuchibhotla [[alternative HTML version deleted]]
Ritwik Sinha
2008-Jul-27 22:47 UTC
[R] graphing regression coefficients and standard errors
Hi Murali, The plot function works on an "lm" object. The example from the help page of lm. Ritwik ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- gl(2,10,20, labels=c("Ctl","Trt")) weight <- c(ctl, trt) anova(lm.D9 <- lm(weight ~ group)) summary(lm.D90 <- lm(weight ~ group - 1))# omitting intercept summary(resid(lm.D9) - resid(lm.D90)) #- residuals almost identical opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) plot(lm.D9, las = 1) # Residuals, Fitted, ... On Fri, Jul 25, 2008 at 4:01 PM, Murali K <murali.jnu1@gmail.com> wrote:> Hello, > I am interested in plotting my regression analysis > results(regression coefficients and standard errors obtained through OLS > and > Tobit models) > in the form of graphs.What is the best way to accomplish this? Thanks. > > > Murali Kuchibhotla > > [[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. >-- Ritwik Sinha ritwik.sinha@gmail.com | +12033042111 | http://ritwik.sinha.googlepages.com/ [[alternative HTML version deleted]]
Mark Difford
2008-Jul-28 07:11 UTC
[R] graphing regression coefficients and standard errors
Hi Murali,>> I am interested in plotting my regression analysis results(regression >> coefficients and >> standard errors obtained through OLS and Tobit models) in the form of >> graphs.plot(obj$lm) will give you a set of diagnostic plots. What you seem to be after is ?termplot. Also look at John Fox's effects package and at Frank Harrell's Design package (sub functions ols and plot.Design). Regards, Mark. Murali K wrote:> > Hello, > I am interested in plotting my regression analysis > results(regression coefficients and standard errors obtained through OLS > and > Tobit models) > in the form of graphs.What is the best way to accomplish this? Thanks. > > > Murali Kuchibhotla > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. > >-- View this message in context: http://www.nabble.com/graphing-regression-coefficients-and-standard-errors-tp18660870p18685184.html Sent from the R help mailing list archive at Nabble.com.