Pregunta

I tried to use the omit and the omit.yes.no options in stargazer() to omit a dummy variable. It seems that there is a bug involving this option. These are what I expect get from the output from stargazer.

                             logit_1       logit_2    logit_3

| covariates 1            |     21***   20 ***    21.4***
                             (0.2)     (0.12)    (0.10)

| covariate 2             |     0.5     0.3***     0.31***
                              (0.4)    (0.13)      (0.15)

| factor(covariate 3) A   |             0.123***   0.3***
                                        (0.06)     (0.08)

| factor(covariate 3) B   |             1.5**       1.03***
                                        (O.78)     (0.073)

|       OM                |    No         No        Yes

My stargazer command is the following;

stargazer (logit_1,logit_2,logit_3, omit='OM', omit.labels="OM", omit.yes.no = c("Yes","No")).

When I run the previous command the results of the OM variable is No Yes Yes.

When I run

stargazer (logit_1,logit_2, omit='OM', omit.labels="OM", omit.yes.no = c("Yes","No"))

I get No No.

And when I run

stargazer (logit_2,logit_3, omit='OM', omit.labels="OM", omit.yes.no = c("Yes","No"))

I get Yes Yes.

¿Fue útil?

Solución

Yes, this is a known bug that will be removed in the next release. For now, you can apply the following fix:

On line 3956 of stargazer-internal.R, please replace:

if (!is.na(.global.coefficients[k,i])) {

by the following:

if (!is.na(.global.coefficients[.global.coefficient.variables[k],i]))

Then, install again from source. You can also e-mail the package's author for a working version of stargazer that corrects this issue.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top