@@ -121,8 +121,8 @@ test_that("cmdstanr methods work", {
121
121
122
122
fit <- cmdstanr :: cmdstanr_example(" logistic" , iter_sampling = 500 , chains = 2 )
123
123
np <- nuts_params(fit )
124
- np_names <- paste0( c(" accept_stat " , " stepsize " , " treedepth " , " n_leapfrog " ,
125
- " divergent " , " energy " ), " __ " )
124
+ np_names <- c(" treedepth__ " , " divergent__ " , " accept_stat__ " , " stepsize__ " ,
125
+ " n_leapfrog__ " , " energy__ " )
126
126
expect_identical(levels(np $ Parameter ), np_names )
127
127
expect_equal(range(np $ Iteration ), c(1 , 500 ))
128
128
expect_equal(range(np $ Chain ), c(1 , 2 ))
@@ -134,10 +134,10 @@ test_that("cmdstanr methods work", {
134
134
expect_equal(range(np $ Iteration ), c(1 , 500 ))
135
135
136
136
r <- rhat(fit )
137
- expect_named(r , c(" alpha" , " beta[1]" , " beta[2]" , " beta[3]" ))
137
+ expect_named(head( r , 4 ) , c(" alpha" , " beta[1]" , " beta[2]" , " beta[3]" ))
138
138
expect_true(all(round(r ) == 1 ))
139
139
140
140
ratio <- neff_ratio(fit )
141
- expect_named(ratio , c(" alpha" , " beta[1]" , " beta[2]" , " beta[3]" ))
141
+ expect_named(head( ratio , 4 ) , c(" alpha" , " beta[1]" , " beta[2]" , " beta[3]" ))
142
142
expect_true(all(ratio > 0 ))
143
143
})
0 commit comments