Skip to content

Multiple Linear regression example #43

Description

@smarlene

Create section for linear regression chapter consisting of:

Start from some second hand ford focus data-set (it will be slightly altered for the purposes later on). We want a model for the price explained by the mileage, engine size and age. We should set up the observation vector and design matrix and feed it to the OLS model (can use statsmodels). Then plot the scatterplot against each of the three variables but mention plotting the estimated regression line would require providing a value for the other two variables. To remedy this we plot a scatterplot of response against predicted value by the model and plot a slope 1 line through the origin through this. Also print the summary and again note in the text where we can read off the estimated coefficients, number of observations and degrees of freedom, rest will come later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    linear regressionIssue relating to linear regression chapter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions