RfastOfficial/Rfast

Missing `intercept` value in fitting Linear Regression using `lmfit`

luna02100 opened this issue · 4 comments

When I fit a linear regression using lmfit, I noticed that there is a missing component, and that is the intercept of the linear model.

> Rfast::lmfit(x = as.matrix(cbind(x1,x2)),y = y)
$be
       [,1]
x1 1.987387
x2 2.977526
attr(,"names")
[1] "x1" "x2"

While fitting a linear regression using base R:

> form_ex
y ~ x1 + x2

> lm(form_ex)

Call:
lm(formula = form_ex)

Coefficients:
(Intercept)           x1           x2  
     0.1084       1.9732       2.9806  

Hi Joshbal, you are suppose to provide the design matrix. This function is similar R's .lm.fit() function.

Hi, one-winged here. I know it's

Hi, one-winged here. It's been 3 months since I create this issue. Yeah, it turns out that I entered the data wrong.

I request to delete this issue if you may.