The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

346006 (2) [Avatar] Offline
#1
A very important comma is missing in the example plot() statement for effect() at the bottom of page 193
of "R_in_Action_Second__v16_MEAP.pdf" :

> library(datasets)

> mtcars

<snipped out data>

> fit <- lm(mpg ~ hp + wt + hp:wt, data=mtcars)

> library(effects)

> plot(effect("hp:wt", fit, list(wt=c(2.2,3.2,4.2))), multiline=TRUE)

Error in Effect.lm(predictors, mod, vcov. = vcov., ...) :
could not find function "vcov."


> plot(effect("hp:wt", fit,, list(wt=c(2.2,3.2,4.2))), multiline=TRUE)


TWO commas after "fit."



robert.kabacoff (170) [Avatar] Offline
#2
Thanks for pointing this out. I have corrected it in the second edition.
511269 (1) [Avatar] Offline
#3
I' ve seen a correction in the 2nd edition.