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

added functioning csa example

parent c024a3e7
No related branches found
No related tags found
No related merge requests found
File added
...@@ -14,14 +14,14 @@ designpath<- system.file("extdata","CSA" ,package = "simulateDCE") ...@@ -14,14 +14,14 @@ designpath<- system.file("extdata","CSA" ,package = "simulateDCE")
notes <- "No Heuristics" notes <- "No Heuristics"
resps =240 # number of respondents resps =240 # number of respondents
nosim=2 # number of simulations to run (about 500 is minimum) nosim=1000 # number of simulations to run (about 500 is minimum)
bcoeff<-list( bcoeff<-list(
bx1 =0.1, bx1 = -0.2,
bx2 =0.3, bx2 = -0.2,
bx3 =0.1, bx3 = -0.1,
bx4 =-0.2) bx4 = -0.05)
destype <- "spdesign" destype <- "spdesign"
...@@ -30,7 +30,8 @@ destype <- "spdesign" ...@@ -30,7 +30,8 @@ destype <- "spdesign"
#place your utility functions here #place your utility functions here
ul<- list(u1= list( ul<- list(u1= list(
v1 =V.1 ~ bx1 * alt1.x1 + bx2 * alt1.x2 + bx3 * alt1.x3 + bx4 * alt1.x4, v1 =V.1 ~ bx1 * alt1.x1 + bx2 * alt1.x2 + bx3 * alt1.x3 + bx4 * alt1.x4,
v2 =V.2 ~ bx1 * alt2.x1 + bx2 * alt2.x2 + bx3 * alt2.x3 + bx4 * alt2.x4 v2 =V.2 ~ bx1 * alt2.x1 + bx2 * alt2.x2 + bx3 * alt2.x3 + bx4 * alt2.x4,
v3 =V.3 ~ -10
) )
) )
...@@ -41,3 +42,5 @@ csa <- simulateDCE::sim_all(nosim = nosim, resps=resps, destype = destype, ...@@ -41,3 +42,5 @@ csa <- simulateDCE::sim_all(nosim = nosim, resps=resps, destype = destype,
saveRDS(csa,file = "tests/manual-tests/csa.RDS")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment