{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaStats/StatsModels.jl/issues/27","repository_url":"https://api.github.com/repos/JuliaStats/StatsModels.jl","labels_url":"https://api.github.com/repos/JuliaStats/StatsModels.jl/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/JuliaStats/StatsModels.jl/issues/27/comments","events_url":"https://api.github.com/repos/JuliaStats/StatsModels.jl/issues/27/events","html_url":"https://github.com/JuliaStats/StatsModels.jl/issues/27","id":238208415,"number":27,"title":"Extend StatsBase.model_response methods with a Distribution argument","user":{"login":"dmbates","id":371258,"avatar_url":"https://avatars3.githubusercontent.com/u/371258?v=3","gravatar_id":"","url":"https://api.github.com/users/dmbates","html_url":"https://github.com/dmbates","followers_url":"https://api.github.com/users/dmbates/followers","following_url":"https://api.github.com/users/dmbates/following{/other_user}","gists_url":"https://api.github.com/users/dmbates/gists{/gist_id}","starred_url":"https://api.github.com/users/dmbates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmbates/subscriptions","organizations_url":"https://api.github.com/users/dmbates/orgs","repos_url":"https://api.github.com/users/dmbates/repos","events_url":"https://api.github.com/users/dmbates/events{/privacy}","received_events_url":"https://api.github.com/users/dmbates/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-23T17:40:00Z","updated_at":"2017-06-23T22:41:47Z","closed_at":null,"body":"I have been thinking about conversion of a binary `PooledDataArray` or `CategoricalVector` to a 0/1 floating point vector in the `StatsBase.model_response` method.  The trick is in determining what kind of response vector (or matrix or other structure) is desired.  It occurred to me that the Distribution type in the model tells us that.  For an `lm` or, in my case, `lmm` model the distribution type is Normal.  For a `glm` or `glmm` model the distribution type is given in the model specification.\r\n\r\nIn creating a `GLM.GlmResp` object the response vector is checked to ensure that all values are in the support of the distribution so we might as well use that as the guide.\r\n\r\nIf this seems reasonable I will create a pull request.\r\n\r\nIs it worthwhile changing the name of this extractor at the same time?  The name `model_response` was copied from R and is not Julianesque."},"comment":{"url":"https://api.github.com/repos/JuliaStats/StatsModels.jl/issues/comments/310788491","html_url":"https://github.com/JuliaStats/StatsModels.jl/issues/27#issuecomment-310788491","issue_url":"https://api.github.com/repos/JuliaStats/StatsModels.jl/issues/27","id":310788491,"user":{"login":"ararslan","id":6396159,"avatar_url":"https://avatars2.githubusercontent.com/u/6396159?v=3","gravatar_id":"","url":"https://api.github.com/users/ararslan","html_url":"https://github.com/ararslan","followers_url":"https://api.github.com/users/ararslan/followers","following_url":"https://api.github.com/users/ararslan/following{/other_user}","gists_url":"https://api.github.com/users/ararslan/gists{/gist_id}","starred_url":"https://api.github.com/users/ararslan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ararslan/subscriptions","organizations_url":"https://api.github.com/users/ararslan/orgs","repos_url":"https://api.github.com/users/ararslan/repos","events_url":"https://api.github.com/users/ararslan/events{/privacy}","received_events_url":"https://api.github.com/users/ararslan/received_events","type":"User","site_admin":false},"created_at":"2017-06-23T22:41:47Z","updated_at":"2017-06-23T22:41:47Z","body":"That definitely sounds reasonable to me! It sounds like it could be ported easily to the statistical modeling functionality that remains in DataFrames as well (though I can take care of that).\r\n\r\nI agree that `model_response` is not a great name. What would you suggest as an alternative?"}}
{"actor":{"display_login":"ararslan"}}