R and Statistics

Below are some sample work using R to do statistics and more.


Course Project / Individual Project

Regression Diagnosis

We introduced three methods in regression diagnosis: subset selection, scatterbox matrix and influence plot. Subset selection allows you to exclude extremely “bad” independent variables. Scatterbox matrix offers you a glance of whether there is any abnormal observation. Influence plot uses residual, hat and cook’s distance to exclude the extreme observations.

Bootstrapping in R

Bootstrapping is a common statistic approach. But how can we apply bootstrapping in mediation in R? Other than using Rmediation package, we can also code our own function.

Below is a function that applies bootstrapping to mediation analysis in using R code.

Matrix Computing Capacity with R and Microsoft R

This analysis serves to evaluate whether Microsoft R Open (using parallel processing) outperforms R (using a single processor at a time) in matrix computing. I use matrix inverse and matrix transpose as two tasks and use computation time as the criterion. 

Analysis indicates that thought there is no significant difference in computing matrix transpose, Microsoft R Open has significant performance gains in computing matrix Inverse.

©2018 by Yu Zhao.