1527 search results for "regression"

Regression on variables, or on categories?

September 30, 2013
By

I admit it, the title sounds weird. The problem I want to address this evening is related to the use of the stepwise procedure on a regression model, and to discuss the use of categorical variables (and possible misinterpreations). Consider the following dataset > db = read.table("http://freakonometrics.free.fr/db2.txt",header=TRUE,sep=";") First, let us change the reference in our categorical variable  (just to...

Read more »

Logistic regression and categorical covariates

September 26, 2013
By
Logistic regression and categorical covariates

A short post to get back – for my nonlife insurance course – on the interpretation of the output of a regression when there is a categorical covariate. Consider the following dataset > db = read.table("http://freakonometrics.free.fr/db.txt",header=TRUE,sep=";") > tail(db) Y X1 X2 X3 995 1 4.801836 20.82947 A 996 1 9.867854 24.39920 C 997 1 5.390730 21.25119 D 998 1...

Read more »

Linear regression from a contingency table

September 7, 2013
By
Linear regression from a contingency table

This morning, Benoit sent me an email, about an exercise he found in an econometric textbook, about linear regression. Consider the following dataset, Here, variable X denotes the income, and Y the expenses. The goal was to fit a linear regression (actually, in the email, it was mentioned that we should try to fit an heteroscedastic model, but let...

Read more »

Passing-Bablok Regression: R code for SAS users

September 2, 2013
By
Passing-Bablok Regression: R code for SAS users

While at the Joint Statistical Meeting a few weeks ago I was talking to a friend about various aspects to clinical trials. He indicated that no current R package was able to perfectly reproduce Passing-Bablok (PB) regression so that it exactly matched SAS. He ultimately wrote a couple of functions and kindly shared them with

Read more »

Nonparametric (local polynomial) regression in R

August 26, 2013
By

Local polynomial regression models can be used as a more flexible alternative to linear regression. However, the nonparametric regression models are slightly more difficult to estimate and interpret than linear regression. This video explains almost ev...

Read more »

Estimation, prediction, and evaluation of logistic regression models

August 26, 2013
By

I provide an introduction to using logistic regression for prediction (binary classification) using the Titanic data competition from www.Kaggle.com as an example. I use models to predict in missing data, estimate a logistic regression model on a trai...

Read more »

R vs Python: Practical Data Analysis (Nonlinear Regression)

August 26, 2013
By
R vs Python: Practical Data Analysis (Nonlinear Regression)

I’ve written a few previous posts comparing R to Python in terms of symbolic math, optimization, and bootstrapping. All of these posts were pretty popular. The last one especially. Many of the commenters brought up the fact that R, while … Continue reading →

Read more »

Non-linear regression in R

August 25, 2013
By
Non-linear regression in R

Here is the link to the article: http://rpubs.com/hughes/7812 There you will discover how to simulate and fit: power function, Michaelis-Menten equation and sigmoid curves in R, the fit is done by least-square using the ‘nls’ function.Filed under: R and Stat Tagged: NLS, R

Read more »

Exporting Results of Linear Regression with Robust Standard Errors

August 24, 2013
By

<p>Loading ...</p>

Read more »

Residuals from a logistic regression

August 23, 2013
By
Residuals from a logistic regression

I always claim that graphs are important in econometrics and statistics ! Of course, it is usually not that simple. Let me come back to a recent experience. A got an email from Sami yesterday, sending me a graph of residuals, and asking me what could be done with a graph of residuals, obtained from a logistic regression ?...

Read more »