Thursday, April 4, 2013

creating voilin plot / box plot in Excel, using REcel (with KMggplot2 plugins)

See the related posts on RExcel (for basic, Excel 2003 and Excel 2007) for basic information.

We discussed how we can use RExcel in previous posts. By implementing RExcel we generate voilin plots (alternative to box plot in look)

(1) First load R and then R commander to see R menu in Excel (see previous posts)

(2) Following example uses dataset cabages from the R dataset library. Load the data.

(3) KMggplot2 (unlike other menus is not activated as such), you need to go to tools and then click Load Pug-ins and then select RcmdrPlugin.KMggplot2. It will promt you to restart Rcmcdr click OK. Now you can see a menu with KMggplot2 in your RExcel menus.


(4)  Now under KMggplot2 menu click Box plot / Voilin plot / Confidence interval. You can then choose volin or box plot. Pick X and Y variable. X variable can be more than one, if you want to create multi-faceted trallis plot.








So you got your volin plot.


You can produce boxplot instead, just change plot type (perhaps using different grouping structure):



Happy plotting !!

fitting and ploting a regression model in Excel using RExcel

See the related posts on RExcel (for basic, Excel 2003 and Excel 2007) for basic information.

We discussed how we can use RExcel in previous posts. By implementing RExcel we can perform cluster analysis and generate Dendogram plots.

(1) First load R and then R commander to see R menu in Excel (see previous posts)

(2) Following example uses dataset CO2 from the R dataset library. Load the data.

In statstics menu click Fit models and then linear regression.


Now we have to select one respnse variable and explanatory variables (one or more). Click OK will produce a regression model results (see outout window):


Now we can plot the model. Click to models menu and then  graphs select basic dignostic plots. You can see residual vs fitted, Normal Q-Q, Scale-Location, residual vs liverage plots.
Similarly other regression plots are available unders models -> graphs and type of plot.


Similarly other plots available, just play around !





Happy plotting !!