Blog Archives

Computing Statistical Power

April 14, 2011
By
Computing Statistical Power

Today's task is to compute a statistical power function in R. For a good definition of power, go here. Thinking about the power of a testing procedure is an often-overlooked aspect of hypothesis testing.I also explain what power (in a statistical sens...

Read more »

Video Tutorial on Robust Standard Errors

April 12, 2011
By
Video Tutorial on Robust Standard Errors

Update: I have included a modified version of this summaryR() command as part of my package tonymisc, which extends mtable() to report robust standard errors. The tonymisc package is available on CRAN through the install.packages() command.If you have...

Read more »

Video Tutorial on Robust Standard Errors

April 12, 2011
By
Video Tutorial on Robust Standard Errors

Update: I have included a modified version of this summaryR() command as part of my package tonymisc, which extends mtable() to report robust standard errors. The tonymisc package is available on CRAN through the install.packages() command.If you have...

Read more »

Video Tutorial on IV Regression

April 10, 2011
By
Video Tutorial on IV Regression

Update: I am working on a better augmentation of the current IV regression functions (specifically ivreg() in AER) in R. I will post a link here to my new method/function for IV regression when I finish debugging the code.Update 2: [15 Ma...

Read more »

Video Tutorial on IV Regression

April 10, 2011
By
Video Tutorial on IV Regression

Update: I am working on a better augmentation of the current IV regression functions (specifically ivreg() in AER) in R. I will post a link here to my new method/function for IV regression when I finish debugging the code.Update 2: [15 Ma...

Read more »

How did I make this plot?

April 9, 2011
By
How did I make this plot?

To make this plot, I used R's plot(), points() and lines() commands. If you have been wanting to learn how to plot in R, watch it unfold in this video tutorial:Also, here's the code I used:

Read more »

How to Shade Under a Normal Density in R

April 3, 2011
By
How to Shade Under a Normal Density in R

The easiest-to-find method for shading under a normal density is to use the polygon() command. That link is to the first hit on Google for "Shading Under a Normal Curve in R." It works (like a charm), but it is not the most intuitive way to let users p...

Read more »

How to Bootstrap in R: The Case of R-squared

March 29, 2011
By
How to Bootstrap in R: The Case of R-squared

I recorded a new video tutorial whose original intent was to demonstrate how to write a for loop. As I wanted to make the for loop count for something, I decided that my application would be to write some code that computes the bootstrap approximation ...

Read more »

An easier to use IV regression command in R

March 10, 2011
By
An easier to use IV regression command in R

Update: I have added some functionality to my ivregress() command. Check out my newer post here.After I posted my last video tutorial on how to use my IV regression function, I received a comment asking why I didn't write the command a different way t...

Read more »

Video Tutorial on Instrumental Variables in R

March 8, 2011
By
Video Tutorial on Instrumental Variables in R

Update: I have replaced this video tutorial with a video tutorial on a newer, easier to use IV regression command. Check out that command here.In this video, I show how to use my instrumental variables function in R, ivreg(), along with its companion ...

Read more »