2016年5月26日木曜日

do not confuse with "plot.mlm is not implemented yet"


Please note that lm output class differs according to a given formula. In most cases, it just belongs to "lm". However, it seems that when the target parameter has multiple culumns, result output also belongs to "mlm"

> class(lm(to.monthly(SP500["2009::2016-02-01"]) ~ GDP_XTS["2009::2016-02-01"]))
[1] "mlm" "lm
> plot(lm(to.monthly(SP500["2009::2016-02-01"]) ~ GDP_XTS["2009::2016-02-01"]))
 エラー: 'plot.mlm' is not implemented yet
> plot(lm(to.monthly(SP500["2009::2016-02-01"])[,6] ~ GDP_XTS["2009::2016-02-01"]))
> class(lm(to.monthly(SP500["2009::2016-02-01"])[,6] ~ GDP_XTS["2009::2016-02-01"]))
[1] "lm"
> plot(lm(to.monthly(SP500["2009::2016-02-01"])[,6] ~ GDP_XTS["2009::2016-02-01"]))
>

0 件のコメント: