{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaStats/GLM.jl/issues/171","repository_url":"https://api.github.com/repos/JuliaStats/GLM.jl","labels_url":"https://api.github.com/repos/JuliaStats/GLM.jl/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/JuliaStats/GLM.jl/issues/171/comments","events_url":"https://api.github.com/repos/JuliaStats/GLM.jl/issues/171/events","html_url":"https://github.com/JuliaStats/GLM.jl/pull/171","id":195537638,"number":171,"title":"[WIP] [needs review] confidence intervals in predict()","user":{"login":"mkborregaard","id":8429802,"avatar_url":"https://avatars.githubusercontent.com/u/8429802?v=3","gravatar_id":"","url":"https://api.github.com/users/mkborregaard","html_url":"https://github.com/mkborregaard","followers_url":"https://api.github.com/users/mkborregaard/followers","following_url":"https://api.github.com/users/mkborregaard/following{/other_user}","gists_url":"https://api.github.com/users/mkborregaard/gists{/gist_id}","starred_url":"https://api.github.com/users/mkborregaard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkborregaard/subscriptions","organizations_url":"https://api.github.com/users/mkborregaard/orgs","repos_url":"https://api.github.com/users/mkborregaard/repos","events_url":"https://api.github.com/users/mkborregaard/events{/privacy}","received_events_url":"https://api.github.com/users/mkborregaard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-14T13:59:30Z","updated_at":"2016-12-14T14:17:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaStats/GLM.jl/pulls/171","html_url":"https://github.com/JuliaStats/GLM.jl/pull/171","diff_url":"https://github.com/JuliaStats/GLM.jl/pull/171.diff","patch_url":"https://github.com/JuliaStats/GLM.jl/pull/171.patch"},"body":"Adds basic support for confidence intervals in predict() (see https://github.com/JuliaStats/GLM.jl/issues/101)\r\n\r\nI have so far only added to the `lm()` function, but it should be fairly easy to transfor to the `glm()` method. Also, the `predict` call is through `DataFrames`, but I have not touched that package, so it only works inside the module (I use Atom’s ability to set the working module). Also, it is not extensively tested. Oh, and because the intervals return a `Matrix`, this makes the `predict` function not be type stable, so some thought is needed here.\r\nBut it is something to build upon.\r\n\r\nA quick example (notice I have to jump through some hoops because I bypass DataFrames):\r\n```julia\r\nusing DataFrames, RCall\r\na = randn(100); b = randn(100); c = a .+ b .+ 0.8randn(100);\r\ndf = DataFrame(a = a, b = b, c = c);\r\nmod = lm(c ~ a + b, df)\r\n\r\npredict(LinearModel(mod.model), hcat(ones(100),Matrix(df[:,1:2])), error = :confint)\r\nR\"\"\"\r\nmod <- lm(c ~ a + b, $(df))\r\npredict(mod, interval = \"confidence\")\r\n\"\"\"\r\n```"},"comment":{"url":"https://api.github.com/repos/JuliaStats/GLM.jl/issues/comments/267044521","html_url":"https://github.com/JuliaStats/GLM.jl/pull/171#issuecomment-267044521","issue_url":"https://api.github.com/repos/JuliaStats/GLM.jl/issues/171","id":267044521,"user":{"login":"nalimilan","id":1120448,"avatar_url":"https://avatars.githubusercontent.com/u/1120448?v=3","gravatar_id":"","url":"https://api.github.com/users/nalimilan","html_url":"https://github.com/nalimilan","followers_url":"https://api.github.com/users/nalimilan/followers","following_url":"https://api.github.com/users/nalimilan/following{/other_user}","gists_url":"https://api.github.com/users/nalimilan/gists{/gist_id}","starred_url":"https://api.github.com/users/nalimilan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nalimilan/subscriptions","organizations_url":"https://api.github.com/users/nalimilan/orgs","repos_url":"https://api.github.com/users/nalimilan/repos","events_url":"https://api.github.com/users/nalimilan/events{/privacy}","received_events_url":"https://api.github.com/users/nalimilan/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T14:17:50Z","updated_at":"2016-12-14T14:17:50Z","body":"To avoid the type instability, you could only return the confidence interval if a third argument `level` is provided."}}
{"actor":{"display_login":"nalimilan"}}