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

Splines and Functional Form #7

Closed
pzivich opened this issue May 4, 2018 · 2 comments
Closed

Splines and Functional Form #7

pzivich opened this issue May 4, 2018 · 2 comments

Comments

@pzivich
Copy link
Owner

pzivich commented May 4, 2018

When looking at functional form plots for spline models, they display oddly. Either something is going wrong in the generation of the matplotlib object or the spline calculation is doing something unexpected....

@pzivich
Copy link
Owner Author

pzivich commented May 4, 2018

This is occurring since the plot functions uses var input but for truly continuous variables you have to do some sort of binning as the function currently works. Since the binning variable var is the categorical variable, it causes issues with the plots...

For a fix, I will need to

  1. Add option to automatically bin (write the code to do this and label everything as the median of that interval)
  2. Grab the bins (over distinct categories) and generate the C(...) estimate from statsmodels
  3. Fit the user specified model
  4. Generate plots so they are estimated and relevant to the VALUES and not the categories

@pzivich
Copy link
Owner Author

pzivich commented May 4, 2018

Error was in functional form plot. Splines work properly. Have added an option to the functional form plotter to auto-categorize continuous variables for LOWESS generated line. Now the functional automatically generates this, unless the user specifies that the variable is discrete bin = False

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