Articles by Tony Cookson

A Population Regression

April 18, 2011 | Tony Cookson

Here's a video on some of the theory behind simple linear regression.There's no R involved with this video, but the video provides some theory behind what it is that R's lm() command estimates.
[Read more...]

A Creative Use of R

April 17, 2011 | Tony Cookson

Update (5/18/2011): Looks like Freakonomics approves as well. Let the record show that I approved first :)I approve: "I use the open-source program R to create the patterns."But, I'm not sure I approve of calling these distributions "evil."In case you...
[Read more...]

Computing Statistical Power

April 14, 2011 | Tony Cookson

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 | Tony Cookson

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 | Tony Cookson

Update: [1 May 2011] 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 | Tony Cookson

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 | Tony Cookson

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...]

An easier to use IV regression command in R

March 10, 2011 | Tony Cookson

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...]

IV Regression

March 8, 2011 | Tony Cookson

Here is my code from a previous post that performs IV regression. This may be easier to copy into an R script. I will post a video tutorial using this code shortly.
[Read more...]

Basic Plots in R

March 7, 2011 | Tony Cookson

Here's a tutorial I recorded on producing basic plots in R.I lost the script file I used to create the video to a horrifying black screen of death, but I used the data from the previous post (available here). Hopefully, the video is clear enough that ...
[Read more...]

Data from last post

March 1, 2011 | Tony Cookson

Posting the code I used in the last post wasn't that useful unless I also posted the data set. Here's the data. These are made up data, but it is a nice data set for illustrating how to conduct a regression. Enjoy!
[Read more...]

Running a Regression in R

February 28, 2011 | Tony Cookson

I created another video tutorial on R. This time, I discuss R's lm() command and how to use it for a variety of standard applications.Here is the code that goes with the video:Enjoy!
[Read more...]

Tutorial on Distributions in R

February 25, 2011 | Tony Cookson

Here's a video tutorial I put together to go over how to generate a random sample from one of the commonly known parametric distributions in R.Along the way, I also discuss how some of the properties of estimators are reflected in the computations I pe...
[Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)