Reader small image

You're reading from  R Statistics Cookbook

Product typeBook
Published inMar 2019
Reading LevelExpert
PublisherPackt
ISBN-139781789802566
Edition1st Edition
Languages
Tools
Concepts
Right arrow
Author (1)
Francisco Juretig
Francisco Juretig
author image
Francisco Juretig

Francisco Juretig has worked for over a decade in a variety of industries such as retail, gambling and finance deploying data-science solutions. He has written several R packages, and is a frequent contributor to the open source community.
Read more about Francisco Juretig

Right arrow

The standard model and ANOVA

In this recipe, we will be more interested in the regression part of it, instead of the ANOVA part. In the previous ANOVA chapter, we only used random effects for the intercepts, and this is usually not the price only way that random effects are introduced. Imagine that we model the sales in terms of price for certain customers, where we have several observations for each one of them. The ordinary least squares (OLS) standard approach would be to ignore this heterogeneity and pool all the observations together.

Naturally, this would introduce a problem, because the residuals would then be correlated (observations belonging to the same individual will produce similar residuals). The correct approach would be to introduce a random effect per individual, but there is a subtle point here: we are not expecting the response to differ in terms of an intercept...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
R Statistics Cookbook
Published in: Mar 2019Publisher: PacktISBN-13: 9781789802566

Author (1)

author image
Francisco Juretig

Francisco Juretig has worked for over a decade in a variety of industries such as retail, gambling and finance deploying data-science solutions. He has written several R packages, and is a frequent contributor to the open source community.
Read more about Francisco Juretig