Blog Archives

How to create confounders with regression: a lesson from causal inference

January 25, 2016
By
How to create confounders with regression: a lesson from causal inference

By Ben Ogorek Introduction Regression is a tool that can be used to address causal questions in an observational study, though no one said it would be easy. While this article won't close the vexing gap between correlation and causation, it will offer specific advice when you're after a causal truth - keep an eye out for...

Read more »

Will the new Star Wars suck? An analysis of directors and movie involvement

December 15, 2015
By
Will the new Star Wars suck? An analysis of directors and movie involvement

How does a bad movie ever get made? Considering that Hollywood's massive budgets provide access to the world's finest writers, directors, and actors, how are movies ever bad? Well, as we all know, they often are. But how could a Star Wars movie, in particular, be anything but great?

Read more »

Three ways to call C/C++ from R

February 10, 2014
By
Three ways to call C/C++ from R

By Ben Ogorek Introduction I only recently discovered the fundamental connection between the C and R languages. It was during a Bay Area useR Group meeting, where presenter J.J. Allaire shared two points to motivate his talk on Rcpp. The first explained just how much of modern R really is C and C++. For...

Read more »

NLSdata: an R package for National Longitudinal Surveys

February 3, 2014
By
NLSdata: an R package for National Longitudinal Surveys

This article was first published on analyze stuff. It has been contributed to Anything but R-bitrary as the third article in its introductory series. By Ben Ogorek Introduction Alongside interstate highways, national defense, and social security, your tax dollars are used to collect data. Sometimes it’s high...

Read more »

Build a search engine in 20 minutes or less

March 27, 2013
By
Build a search engine in 20 minutes or less

…or your money back. author = "Ben Ogorek"Twitter = "@baogorek"email = paste0(sub("@", "", Twitter), "@gmail.com") Setup Pretend this is Big Data: doc1 <- "Stray cats are running all over the place. I see 10 a day!"doc2 <- "Cats are killers. They...

Read more »

A simple web application using Rook

December 21, 2012
By
A simple web application using Rook

by Ben Ogorek I'm grateful to Rook for helping me, a simple statistician, learn a few fundamentals of web technology. For R web application development, there are increasingly polished methods available (most notably Shiny ), but you can build one...

Read more »

Hierarchical linear models and lmer

October 31, 2012
By
Hierarchical linear models and lmer

Hierarchical linear models and lmer Article by Ben Ogorek Graphics by Bob Forrest Background My last article featured linear models with random slopes. For estimation and prediction, we used the lmer function from the lme4 package. Today we'll consider another level in the hierarchy, one...

Read more »

Random regression coefficients using lme4

June 11, 2012
By
Random regression coefficients using lme4

What's the gain over lm()?By Ben OgorekRandom effects models have always intrigued me. They offer the flexibility of many parameters under a single unified, cohesive and parsimonious system. But with the growing size of data sets and increased ability to estimate many parameters with a high level of accuracy, will the subtleties of the random effects analysis be lost? In this...

Read more »

The lm() function with categorical predictors

April 8, 2012
By
The lm() function with categorical predictors

What's with those estimates?By Ben OgorekIn R, categorical variables can be added to a regression using the lm() function without a hint of extra work. But have you ever look at the resulting estimates and wondered exactly what they were?First, let's define a data set.set.seed(12255)n = 30sigma = 2.0AOV.df <- data.frame(category = c(rep("category1", n)     ...

Read more »

Sponsors

Mango solutions



RStudio homepage



Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training



http://www.eoda.de







ODSC

ODSC

CRC R books series











Contact us if you wish to help support R-bloggers, and place your banner here.

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)