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

Uncouple GLM from DataFrames #57

Merged
merged 4 commits into from
Apr 4, 2014
Merged

Conversation

simonster
Copy link
Member

This adds a method for fitting a GLM by explicitly specifying the design matrix and response vectors. The resulting GlmMod object has empty ModelFrame and formula fields, and I've changed the few functions that reference these fields to first check if they are defined, but eventually it is probably a good idea to follow @lindahua's suggestion from JuliaStats/Roadmap.jl#11 and split out functionality that depends on DataFrames into a separate package.

I have also added a method for fitting a GLM on a new response vector using the same design matrix, using the old parameter estimates as the starting point.

I am happy to wait for further thinking about design before merging this. I am opening the PR because I needed this functionality now for a project I'm working on, and most of these changes are likely to be necessary no matter how we decide to handle this.

Closes #54

This adds a method for fitting a GLM by explicitly specifying the
design matrix and response vectors. The resulting GlmMod object has
empty ModelFrame and formula fields, and I've changed the few
functions that reference these fields to first check if they are
defined.

Eventually it is probably a good idea to follow @lindahua's suggestion
from JuliaStats/Roadmap.jl#11 and split out functionality that depends
on DataFrames into a separate package, but most of these changes will
be necessary for that as well.

I have also added a method for fitting a GLM on a new response vector
using the same design matrix.

Closes JuliaStats#54
@simonster simonster changed the title Allow fitting GLMs on matrices and refitting GLMs on new responses Uncouple GLM from DataFrames Mar 30, 2014
@simonster
Copy link
Member Author

I've updated this PR to be in line with JuliaData/DataFrames.jl#571. Now we don't need to use DataFrames at all for GLM.jl, and the usage changes minimally. JuliaStats/StatsBase.jl#51 and then that PR need to be merged first, though.

@simonster
Copy link
Member Author

I've merged the other two PRs, so this is ready to go. The Travis failures are because the required versions of StatsBase and DataFrames (still required for the tests) have not yet been released. I'll wait a day or two for comments before I merge.

@simonster simonster merged commit 81ad215 into JuliaStats:master Apr 4, 2014
@simonster simonster deleted the sjk/matrix branch April 4, 2014 04:11
@simonster
Copy link
Member Author

I merged this, but since we needed fixes for the removal of StoredArray and unexporting of Cholesky in Base and I didn't want to release it immediately, I created a dataframes branch with the pre-merge state, committed those fixes, and tagged a new release from there.

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

Successfully merging this pull request may close these issues.

Fitting glms on matricies instead of dataframes?
1 participant