Invalid $family member with stan_polr
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 401
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
In the documentation for stanreg objects, object$family is supposed to be of class "family"; however, the object returned by stan_polr puts a character string there.
Example
example(stan_polr)
# --- (output not shown, produces an object named 'fit') ---
fit$family
## [1] "probit"
I suggest that instead this should be binomial(link = "probit"). I realize that "binomial" isn't quite right, but it is in a sense right with regard to each ordinal cut point, and the classes of objects should be as documented.
Operating System:
First part of sessionInfo():
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rstanarm_2.15.2 Rcpp_0.12.10 lsmeans_2.25-10 estimability_1.2 pscl_1.4.9
[6] lattice_0.20-35 MASS_7.3-47
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the stan_polr example and inspecting the returned stanreg object's family member. Compare its value and class with the documented stanreg contract and determine the expected representation for ordinal models. Done means the family member and its documentation agree, with the example behavior covered by an appropriate check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100