Relative Content

Tag Archive for rregressionformulafixest

(R) StepReg: error in formula without constant

I am using the function StepReg::stepwise() to carry out a stepwise analysis. I aim at estimating a model without the constant, because I am running a dynamic model with variables in first differences. I have already created a “dataset” object where I stored my dataset with variable in first differences, computed using dyplr::mutate(). Following the StepReg::stepwise() documentation (https://cran.r-project.org/web/packages/StepReg/StepReg.pdf), it is possibile to allow for no constant typing either ‘0’ or ‘-1’ in the ‘formula =’ option (the documentation says: “By default, an intercept term is always included in the models, to exclude it, include ’0’ or ’- 1’ in your formula: ’y ~ 0 + x1’, ’y ~ x1 + 0’, and ’y ~ x1-1’”). The option I am specyfing are: