diff --git a/R/sim_choice.R b/R/sim_choice.R index d97b9db7ea13b876333f7b5669963f3d07dc98ae..7701952f3965d0c594a883eea1f195d77e842699 100644 --- a/R/sim_choice.R +++ b/R/sim_choice.R @@ -26,6 +26,13 @@ sim_choice <- function(designfile, no_sim=10, respondents=330,ut ,destype=destyp } + transform_util2 <- function() { + + mnl_U <-paste(purrr::map_chr(ut[[1]],as.character,keep.source.attr = TRUE),collapse = "",";") %>% + stringr::str_replace_all( c( "priors\\[\"" = "" , "\"\\]" = "" , "~" = "=", "\\." = "_" , "V_"="U_")) + + } + #### Function to simulate and estimate #### estimate_sim <- function(run=1) { #start loop