Skip to content

Inconsistent intercepts between ModelFrame and apply_schema #310

@GBarnsley

Description

@GBarnsley

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions