# lm

### Why pictures are so important when modeling data?

October 31, 2012 |

(bis repetita) Consider the following regression summary,Call: lm(formula = y1 ~ x1)   Coefficients: Estimate Std. Error t value Pr(__|t|) (Intercept) 3.0001 1.1247 2.667 0.02573 * x1 0.5001 0.1179 4.241 0.00217 **... [Read more...]

### Visualization in regression analysis

February 23, 2012 |

Visualization is a key to success in regression analysis. This is one of the (many) reasons I am also suspicious when I read an article with a quantitative (econometric) analysis without any graph. Consider for instance the following dataset, obtai... [Read more...]

### On linear models with no constant and R2

February 2, 2012 |

In econometrics course we always say to our students that "if you fit a linear model with no constant, then you might have trouble. For instance, you might have a negative R-squared". So I tried to find databases on the internet such that, when we ... [Read more...]

### Linear regression models with robust parameter estimation

May 15, 2010 |

There are situations in regression modelling where robust methods could be considered to handle unusual observations that do not follow the general trend of the data set. There are various packages in R that provide robust statistical methods which are summarised on the CRAN Robust Task View. As an example ... [Read more...]

### Manual variable selection using the dropterm function

May 12, 2010 |

When fitting a multiple linear regression model to data a natural question is whether a model can be simplified by excluding variables from the model. There are automatic procedures for undertaking these tests but some people prefer to follow a more manual approach to variable selection rather than pressing a ...

### Using the update function during variable selection

May 9, 2010 |

When fitting statistical models to data where there are multiple variables we are often interested in adding or removing terms from our model and in cases where there are a large number of terms it can be quicker to use the update function to start with a formula from a ... [Read more...]

### Analysis of Covariance – Extending Simple Linear Regression

April 28, 2010 |

The simple linear regression model considers the relationship between two variables and in many cases more information will be available that can be used to extend the model. For example, there might be a categorical variable (sometimes known as a covariate) that can be used to divide the data set ...

### Simple Linear Regression

April 23, 2010 |

One of the most frequent used techniques in statistics is linear regression where we investigate the potential relationship between a variable of interest (often called the response variable but there are many other names in use) and a set of one of more variables (known as the independent variables or ...

### In a nls star things might be different than the lm planet…

March 10, 2010 |

The nls() function has a well documented (and discussed) different behavior compared to the lm()’s. Specifically you can’t just put an indexed column from a data frame as an input or output of the model. __ nls(data[,2] ~ c + expFct(data[,4],beta), data = time.data, + start = start.list) Error ... [Read more...]

### One-way ANOVA (cont.)

February 12, 2010 |

In a previous post we considered using R to fit one-way ANOVA models to data. In this post we consider a few additional ways that we can look at the analysis. In the analysis we made use of the linear model function lm and the analysis could be conducted using ...