Blog Archives

Defaults, Lists and Classes: A Functional Post

May 20, 2011
By
Defaults, Lists and Classes: A Functional Post

In this post, I demonstrate a couple of useful tricks to writing functions in R. The context is a function I wrote called called samp() that allows for an easy demonstration of sampling distribution properties.DefaultsBy default, this function draws K...

Read more »

Porting Stata-like Marginal Effects to LaTeX

May 19, 2011
By
Porting Stata-like Marginal Effects to LaTeX

The TimeSeriesIreland Blog posted an excellent start on a function that automatically computes marginal effects for probit and logit models. As I have always wanted an easy-to-use function that computes and reports marginal effects in R, I was elated ...

Read more »

Porting Stata-like Marginal Effects to LaTeX

May 19, 2011
By
Porting Stata-like Marginal Effects to LaTeX

The TimeSeriesIreland Blog posted an excellent start on a function that automatically computes marginal effects for probit and logit models. As I have always wanted an easy-to-use function that computes and reports marginal effects in R, I was elated ...

Read more »

Describing Data: Frequently Used Commands

May 13, 2011
By
Describing Data: Frequently Used Commands

Obtaining a coherent numerical summary of data is a common task, and it is common to want to port these summary statistics into a table of results. When I am in interactive mode with my data, I use the summary() command applied to my data frame. For ...

Read more »

Describing Data: Frequently Used Commands

May 13, 2011
By
Describing Data: Frequently Used Commands

Obtaining a coherent numerical summary of data is a common task, and it is common to want to port these summary statistics into a table of results. When I am in interactive mode with my data, I use the summary() command applied to my data frame. For ...

Read more »

Extending mtable() to ivreg, gls and robust standard errors

May 9, 2011
By
Extending mtable() to ivreg, gls and robust standard errors

I have written several extensions of the mtable() command in the memisc library that may come in handy. The methods are available in a package I have written called tonymisc (now, available on CRAN). A zipped folder with my package files is available...

Read more »

Extending mtable() to ivreg, gls and robust standard errors

May 9, 2011
By
Extending mtable() to ivreg, gls and robust standard errors

I have written several extensions of the mtable() command in the memisc library that may come in handy. The methods are available in a package I have written called tonymisc (now, available on CRAN). A zipped folder with my package files is available...

Read more »

Putting Robust Standard Errors into LaTeX Tables: An Extension of mtable

May 3, 2011
By
Putting Robust Standard Errors into LaTeX Tables: An Extension of mtable

I recently discovered the mtable() command in the memisc library and its use with toLatex() to produce nice summary output for lm and glm objects in a nicely formatted table like this:Once you have your linear model objects, all you need is one command...

Read more »

Putting Robust Standard Errors into LaTeX Tables: An Extension of mtable

May 3, 2011
By
Putting Robust Standard Errors into LaTeX Tables: An Extension of mtable

I recently discovered the mtable() command in the memisc library and its use with toLatex() to produce nice summary output for lm and glm objects in a nicely formatted table like this:Once you have your linear model objects, all you need is one command...

Read more »

Forming Formulas

April 29, 2011
By
Forming Formulas

One of the first functions a new R user learns how to use is the lm() command, which involves stating the model formula.lm(y~x1+x2, data=mydata)After a while, this just becomes a natural way to say "I want a regression of y on x1 and x2 using mydata." ...

Read more »