Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using r2 as a regression name conflicts with r2 (r-squared?) #248

Closed
eloualiche opened this issue Nov 13, 2023 · 1 comment
Closed

Using r2 as a regression name conflicts with r2 (r-squared?) #248

eloualiche opened this issue Nov 13, 2023 · 1 comment

Comments

@eloualiche
Copy link
Member

I am used to name different regression r1, r2, ..., rn to print them later using regtable.

I think a bug showed up recently because this runs

using DataFrames, RDatasets, FixedEffectModels
df = dataset("plm", "Cigar")
r1 = reg(df, @formula(Sales ~ NDI + fe(State) + fe(Year)), Vcov.cluster(:State), weights = :Pop)

But this errors

r2 = reg(df, @formula(Sales ~ NDI + fe(State) + fe(Year)), Vcov.cluster(:State), weights = :Pop)
ERROR: cannot assign a value to imported variable FixedEffectModels.r2 from module Main
Stacktrace:
 [1] top-level scope
   @ REPL[313]:1
@matthieugomez
Copy link
Member

issue not reproductible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants