2011-12-16から1日間の記事一覧

水準ごとに回帰をかける

以下を参照。 http://stackoverflow.com/questions/7523427/ddply-with-lm-function 一旦回帰の結果をリストに入れて、coefやらanovaで目的のものを引き出すという感じ。 res <- dlply(iris, .(Species), lm, formula = Sepal.Length~Sepal.Width) coefs <- …