1568 search results for "regression"

Interactive visualization of non-linear logistic regression decision boundaries with Shiny

Interactive visualization of non-linear logistic regression decision boundaries with Shiny

(skip to the shiny app) Model building is very often an iterative process that involves multiple steps of choosing an algorithm and hyperparameters, evaluating that model / cross validation, and optimizing the hyperparameters. I find a great aid in this process, for classification tasks, is not only to keep track of the accuracy across models, »more

Read more »

Example 2014.7: Simulate logistic regression with an interaction

June 24, 2014
By
Example 2014.7: Simulate logistic regression with an interaction

Reader Annisa Mike asked in a comment on an early post about power calculation for logistic regression with an interaction. This is a topic that has come up with increasing frequency in grant proposals and article submissions. We'll begin by showing how to simulate data with the interaction, and in our next post...

Read more »

Stacking Regressions: Latex Tables with R and stargazer

May 3, 2014
By
Stacking Regressions: Latex Tables with R and stargazer

In my paper on the impact of the shale oil and gas boom in the US, I run various instrumental variables specifications. For these, it is nice to stack the regression results one on the other – in particular, to have one row for the IV results, one row for the Reduced Form and maybe

Read more »

Example of linear regression and regularization in R

April 28, 2014
By

When getting started in machine learning, it's often helpful to see a worked example of a real-world problem from start to finish. But it can be hard to find an example with the "right" level of complexity for a novice. Here's what I look for: uses r...

Read more »

Use of freqparcoord for Regression Diagnostics

April 14, 2014
By
Use of freqparcoord for Regression Diagnostics

This is the third in my series of three posts on my package freqparcoord with Yingkang Xie. (My next post after this will show how to use R to explore one of my favorite examples of “what can go wrong” in statistics.) Here is a very brief review of my previous posts regarding freqparcoord. A

Read more »

Use of freqparcoord for Regression Diagnostics

April 14, 2014
By
Use of freqparcoord for Regression Diagnostics

This is the third in my series of three posts on my package freqparcoord with Yingkang Xie. (My next post after this will show how to use R to explore one of my favorite examples of “what can go wrong” in statistics.) Here is a very brief review of my previous posts regarding freqparcoord. A

Read more »

Regressions with Multiple Fixed Effects – Comparing Stata and R

April 5, 2014
By
Regressions with Multiple Fixed Effects – Comparing Stata and R

In my paper on the impact of the recent fracking boom on local economic outcomes, I am estimating models with multiple fixed effects. These fixed effects are useful, because they take out, e.g. industry specific heterogeneity at the county level - or state specific time shocks. The models can take the form:    where is

Read more »

MoneyPuck – Best subsets regression of NHL teams

March 17, 2014
By
MoneyPuck – Best subsets regression of NHL teams

Spring is at hand and it is a time of renewal, March Madness and to settle scores in the NHL.  There are many scores to be settled: Flyers vs. Penguins, Blackhawks vs. Red Wings, Leafs vs. Habs and pretty much everyone else vs. the Bruins.  L...

Read more »

Regression with multiple predictors

February 18, 2014
By

(This article was first published on Digithead's Lab Notebook, and kindly contributed to R-bloggers) Now that I'm ridiculously behind in the Stanford Online Statistical Learning class, I thought it would be fun to try to reproduce the figure on page 36 of the slides from chapter 3 or page 81 of the book. The result is a curvaceous surface...

Read more »

Solutions for Multicollinearity in Regression(2)

February 16, 2014
By
Solutions for Multicollinearity in Regression(2)

Continue to discuss this topic about multicollinearity in regression. Firstly, it is necessary introduce how to calculate the VIF and condition number via software such as R. Of course it is really easy for us. The vif() in car and kappa() can be applied to calculate the VIF and condition number, respectively. Consider the data from … Continue reading...

Read more »