Monthly Archives: March 2016

R Open Labs: mi

Last week, Professor Ben Goodrich stopped by R Open Labs to show us how to use the mi package, which he worked on with Professor Andrew Gelman.

As the name ‘mi’ suggests, this package does multiple imputations to help you predict missing values in your data sets.

missingdata

Screen capture of mi demo by Benjamin Goodrich

 

 

 

 

Check out the demo if you’d like to give the mi package a try!

R Open Labs continues every Weds, 10 am -12pm, through April 20th.  Drop in anytime! 

 

 

R Open Labs: QQPlot

Post by Ellie Ransom, Research Services Coordinator, Science and Engineering Libraries

At last week’s R Open Lab, we visualized our data to test our assumptions of normality using two of of R’s native commands, qqnorm and qqline.

We practiced using the built in dataset, trees, and looked at the variables Height and Volume separately.

Notice how the Height variable is basically normal, but the Volume variable appears to be skewed.

qqnorm(trees$Height)
qqline(trees$Height)

Inline image 2

qqnorm(trees$Volume)
qqline(trees$Volume)

Inline image 3

It might make sense to transform the skewed data before analyzing it!

qqnorm(log(trees$Volume))
qqline(log(trees$Volume))

Inline image 4

Share your thoughts and suggestions with us here, and we’ll see you next week!