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

posterior_linpred() for ordinal families: argument for taking the intercept into account #1137

Merged
merged 34 commits into from
May 5, 2021
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a609e11
Introduce an argument to posterior_linpred() for taking the intercept…
fweber144 Apr 12, 2021
fcd2c21
Add a NEWS entry.
fweber144 Apr 12, 2021
0a68dae
Insert GitHub PR number.
fweber144 Apr 12, 2021
40e43ac
Merge branch 'master' into projpred_augdat
fweber144 Apr 13, 2021
ec4126c
Merge branch 'master' into projpred_augdat
fweber144 Apr 14, 2021
448e813
Merge branch 'master' into projpred_augdat
fweber144 Apr 14, 2021
7b696c2
Merge branch 'master' into projpred_augdat
fweber144 Apr 29, 2021
de47fdd
add 'slice' function
paul-buerkner Apr 29, 2021
837a8e5
refactor 'dcumulative'
paul-buerkner Apr 29, 2021
3a431d8
update implementation of 'incl_thres'
paul-buerkner Apr 29, 2021
63ba13e
fix typo
paul-buerkner Apr 29, 2021
827591f
Re-indent tests/local/tests.models_new.R
fweber144 Apr 30, 2021
8e7f4fe
Add (preliminary) tests for argument `incl_thres` of posterior_linpre…
fweber144 Apr 30, 2021
4adac19
Fix a test for argument `incl_thres` of posterior_linpred() (the one …
fweber144 Apr 30, 2021
089e506
Remove an unnecessary check.
fweber144 Apr 30, 2021
d689fd7
Fix a typo.
fweber144 Apr 30, 2021
b690b75
posterior_epred_ordinal() in case of grouped thresholds: Fill missing…
fweber144 Apr 30, 2021
71eb8eb
Merge branch 'master' into projpred_augdat
fweber144 May 1, 2021
8eb1157
posterior_epred_ordinal() in case of grouped thresholds: For the "ide…
fweber144 May 1, 2021
650b732
Replace remaining extract_col() occurrences by slice_col().
fweber144 May 1, 2021
e089a4d
minor cleaning
paul-buerkner May 2, 2021
5c1c2e3
Internally document dcumulative() and inv_link_cumulative().
fweber144 May 3, 2021
00148e1
In inv_link_cumulative(): Overwrite `x`.
fweber144 May 3, 2021
64080d3
Create and use inv_link_sratio().
fweber144 May 3, 2021
1da7f7e
Create and use inv_link_cratio().
fweber144 May 3, 2021
b0bde2f
Create and use inv_link_acat().
fweber144 May 3, 2021
5b4b3f9
Test that d<ordinal_family>() works correctly.
fweber144 May 4, 2021
5fa503e
Add argument `drop` to slice().
fweber144 May 4, 2021
aadc683
inv_link_sratio(), inv_link_cratio(), and inv_link_acat(): Allow for …
fweber144 May 4, 2021
d7e50bf
Test that inv_link_<ordinal_family>() works correctly for arrays.
fweber144 May 4, 2021
5c2cdb4
minor cleaning
paul-buerkner May 5, 2021
2438629
add frank as contributor
paul-buerkner May 5, 2021
68b4fe7
some more minor cleaning
paul-buerkner May 5, 2021
c841e36
more cleaning
paul-buerkner May 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace remaining extract_col() occurrences by slice_col().
  • Loading branch information
fweber144 committed May 1, 2021
commit 650b732bceaa6c5ce37b143a3d32ab2fcf604812
4 changes: 2 additions & 2 deletions R/posterior_epred.R
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ posterior_epred_categorical <- function(prep) {

posterior_epred_multinomial <- function(prep) {
get_counts <- function(i) {
eta <- insert_refcat(extract_col(eta, i), family = prep$family)
eta <- insert_refcat(slice_col(eta, i), family = prep$family)
dcategorical(cats, eta = eta) * trials[i]
}
eta <- abind(prep$dpars, along = 3)
Expand All @@ -522,7 +522,7 @@ posterior_epred_multinomial <- function(prep) {

posterior_epred_dirichlet <- function(prep) {
get_probs <- function(i) {
eta <- insert_refcat(extract_col(eta, i), family = prep$family)
eta <- insert_refcat(slice_col(eta, i), family = prep$family)
dcategorical(cats, eta = eta)
}
eta <- prep$dpars[grepl("^mu", names(prep$dpars))]
Expand Down