Create lm object from data/coefficients

后端 未结 2 2142
旧巷少年郎
旧巷少年郎 2021-02-14 09:47

Does anyone know of a function that can create an lm object given a dataset and coefficients?

I\'m interested in this because I started playing with Bayesian model avera

2条回答
  •  盖世英雄少女心
    2021-02-14 10:34

    It seems you can compute your lm object as usual, and then modify the coefficients afterwards by modifying the $coefficients attribute of your lm() result.

    See this question and results for more details :

    http://tolstoy.newcastle.edu.au/R/e2/help/07/08/24294.html

    Not sure it corresponds to what you want to do, though...

提交回复
热议问题