@@ -3,7 +3,7 @@ layer_cdc_flatline_quantiles <- function(
3
3
... ,
4
4
aheads = 1 : 4 ,
5
5
quantiles = c(.01 , .025 , 1 : 19 / 20 , .975 , .99 ),
6
- nsims = 1e5 ,
6
+ nsims = 1e3 ,
7
7
by_key = " geo_value" ,
8
8
symmetrize = FALSE ,
9
9
nonneg = TRUE ,
@@ -73,15 +73,15 @@ slather.layer_cdc_flatline_quantiles <-
73
73
cols_in_preds <- hardhat :: check_column_names(p , object $ by_key )
74
74
if (! cols_in_preds $ ok ) {
75
75
cli :: cli_warn(c(
76
- " Predicted values are missing key columns: {.var cols_in_preds$missing_names}." ,
76
+ " Predicted values are missing key columns: {.val { cols_in_preds$missing_names} }." ,
77
77
" Ignoring these."
78
78
))
79
79
}
80
80
if (inherits(the_fit , " _flatline" )) {
81
81
cols_in_resids <- hardhat :: check_column_names(r , object $ by_key )
82
82
if (! cols_in_resids $ ok ) {
83
83
cli :: cli_warn(c(
84
- " Existing residuals are missing key columns: {.var cols_in_resids$missing_names}." ,
84
+ " Existing residuals are missing key columns: {.val { cols_in_resids$missing_names} }." ,
85
85
" Ignoring these."
86
86
))
87
87
}
@@ -98,7 +98,7 @@ slather.layer_cdc_flatline_quantiles <-
98
98
cols_in_resids <- hardhat :: check_column_names(key_cols , object $ by_key )
99
99
if (! cols_in_resids $ ok ) {
100
100
cli :: cli_warn(c(
101
- " Requested residuals are missing key columns: {.var cols_in_resids$missing_names}." ,
101
+ " Requested residuals are missing key columns: {.val { cols_in_resids$missing_names} }." ,
102
102
" Ignoring these."
103
103
))
104
104
}
@@ -139,9 +139,6 @@ propogate_samples <- function(
139
139
samp <- quantile(r , probs = c(0 , seq_len(nsim - 1 )) / (nsim - 1 ), na.rm = TRUE )
140
140
res <- list ()
141
141
142
- # p should be all the same
143
- p <- max(p , na.rm = TRUE )
144
-
145
142
raw <- samp + p
146
143
if (nonneg ) raw <- pmax(0 , raw )
147
144
res [[1 ]] <- raw
0 commit comments