-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Description
library(fixest)
packageVersion("fixest")
#> [1] '0.11.1'
### works
feols(mpg ~ hp, offset = ~ log(qsec), data = mtcars)
#> OLS estimation, Dep. Var.: mpg
#> Observations: 32
#> Offset: log(qsec)
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 27.066631 1.643907 16.46482 < 2.2e-16 ***
#> hp -0.067171 0.010181 -6.59757 2.6589e-07 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 3.76316 Adj. R2: 0.578392
### works
feols(c(mpg, am) ~ hp, data = mtcars)
#> Standard-errors: IID
#> Dep. var.: mpg
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 30.098861 1.633921 18.42125 < 2.2e-16 ***
#> hp -0.068228 0.010119 -6.74239 1.7878e-07 ***
#> ---
#> Dep. var.: am
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.665888 0.208106 3.19976 0.0032406 **
#> hp -0.001770 0.001289 -1.37332 0.1798309
### doesn't work
feols(c(mpg, am) ~ hp, offset = ~ log(qsec), data = mtcars)
#> Error in y - offset: non-numeric argument to binary operator
Metadata
Metadata
Assignees
Labels
No labels