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

Inconsistent intercepts between ModelFrame and apply_schema #310

Open
GBarnsley opened this issue Jun 11, 2024 · 0 comments
Open

Inconsistent intercepts between ModelFrame and apply_schema #310

GBarnsley opened this issue Jun 11, 2024 · 0 comments

Comments

@GBarnsley
Copy link

Looks the interpretation of not specifying an intercept changes depending on whether you is ModelFrame or apply_schema, see the following code snippet

using StatsModels, DataFrames

f = @formula(y ~ x)

df = DataFrame(y = [1, 2, 3], x = [4, 5, 6])

mf = ModelFrame(f, df)
mf.f #has an intercept

apply_schema(f, schema(f, df)) #no intercept

Also since ModelFrame is not encouraged, it's a bit strange to have the categorical variable contrasts locked behind that function, unless there's a simple way to use them with apply_schema?

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

1 participant