Skip to content

Assignment 10: Task 3 GLM error #869

@sagniksom

Description

@sagniksom

Hi, I am having an issue with the GLM initialization.

Here is my code:

le_model = sm.GLM(y=world_data_2014.child_mortality, x=sm.add_constant(world_data_2014.income), family=sm.families.Gaussian(link=sm.families.links.log()))

le_results = le_model.fit()


# do not change the code below()
print(le_results.summary())

and I get this error:

TypeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 le_model = sm.GLM(y=world_data_2014.child_mortality, x=sm.add_constant(world_data_2014.income), family=sm.families.Gaussian(link=sm.families.links.log()))
2
3 le_results = le_model.fit()
4
5

TypeError: GLM.init() missing 2 required positional arguments: 'endog' and 'exog'

Any suggestions?

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