You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe not a big deal, but it should be fixed or an informative error message should be given.
library(BayesMallows)
set.seed(1)
# UPDATING A MALLOWS MODEL WITH NEW COMPLETE RANKINGS# Assume we first only observe the first four rankings in the potato_visual# datasetdata_first_batch<-potato_visual[1:4, ]
# We start by fitting a model using Metropolis-Hastingsmod_init<- compute_mallows(
data= setup_rank_data(data_first_batch),
compute_options= set_compute_options(nmc=10000))
# Convergence seems good after no more than 2000 iterations
assess_convergence(mod_init)
burnin(mod_init) <-2000# Next, assume we receive four more observationsdata_second_batch<-potato_visual[5:8, ]
# We can now update the model using sequential Monte Carlomod_second<- update_mallows(
model=mod_init,
new_data= setup_rank_data(rankings=data_second_batch),
smc_options= set_smc_options(n_particles=1, resampler="systematic")
)
#> Error in eval(expr, envir, enclos): Not a matrix.
Maybe not a big deal, but it should be fixed or an informative error message should be given.
Created on 2024-03-25 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: