Skip to content
Snippets Groups Projects
Commit 5fccd92c authored by dj44vuri's avatar dj44vuri
Browse files

still not working for spatialchoicesim

parent 7b2815e5
No related branches found
No related tags found
No related merge requests found
utils::globalVariables(c("designfile", "destype", "Choice.situation", "Design", "." ,"ID", ":=", "..density..", "sou_gis", "block", "Block", "row_id", "final_set")) utils::globalVariables(c("designfile", "destype", "Choice.situation", "Design", "." ,"ID", ":=", "..density..", "sou_gis", "block", "Block", "row_id", "final_set", "parname", "id"))
...@@ -25,7 +25,7 @@ sim_choice <- function(designfile, no_sim = 10, respondents = 330, u ,designtype ...@@ -25,7 +25,7 @@ sim_choice <- function(designfile, no_sim = 10, respondents = 330, u ,designtype
bcoeff <- bcoeff_result$bcoeff bcoeff <- bcoeff_result$bcoeff
bcoeff_lookup <- bcoeff_result$bcoeff_lookup bcoeff_lookup <- bcoeff_result$bcoeff_lookup
browser()
u <- purrr::map(u, function(utility_group) { u <- purrr::map(u, function(utility_group) {
purrr::map(utility_group, function(utility) { purrr::map(utility_group, function(utility) {
# Convert the RHS of the formula to a single string # Convert the RHS of the formula to a single string
...@@ -41,7 +41,7 @@ sim_choice <- function(designfile, no_sim = 10, respondents = 330, u ,designtype ...@@ -41,7 +41,7 @@ sim_choice <- function(designfile, no_sim = 10, respondents = 330, u ,designtype
) )
# Recreate the formula with the modified RHS # Recreate the formula with the modified RHS
formula(paste(as.character(formula.tools::lhs(utility)), "~", modified_rhs)) stats::formula(paste(as.character(formula.tools::lhs(utility)), "~", modified_rhs))
}) })
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment