[R] notation question

Carson Farmer carson.farmer at gmail.com
Wed Jul 20 03:00:24 CEST 2011


Thank you Rolf,
>> Using the analysis of co-variance example from MASS (fourth edition, p
>> 142), what is the correct notation for the formula "Gas, ~ Insul/Temp
>    There shouldn't be a comma after ``Gas'' in that formula.
>> - 1"? Obviously, if we fit it as two separate models (as in the
>> example above it), we would have something like y_i = \beta x_i for
>> each of the two models.
>    No.  y_i = alpha + beta x_i  .  Clearly you need an intercept.
>    Do you really expect gas consumption to be nil when the average
>    external temperature is 0 degrees C ?
Right, of course... both silly mistakes, my apologies!
>> So my question is, when we have a single model
>> with a k-level factor interaction term as in the equation above, what
>> is the correct/standard statistical (LaTeX style) notation?
> The model is simply
>    y_ij = alpha_i + beta_i x_ij
> where i = 1 (before) or 2 (after).  I.e. you are allowing a different slope
> and intercept
> for each of the scenarios (before and after).
> But this is the ``deterministic'' part of the model.  You should really
> include the random part:
>    y_ij = alpha_i + beta_i x_ij + E_ij
> where the E_ij are independent random variables with mean 0 and common
> variance sigma^2.  (Often the E_ij are assumed to be Gaussian, mainly
> because if all you have is a hammer, then everything looks like a nail).
Perfect! Thanks for the clarification. I think I was previously trying
to be a bit more clever than necessary (and as a result not being very
clever at all :-p)

Carson



More information about the R-help mailing list