Skip to content
Snippets Groups Projects
Select Git revision
  • 261d20bf5ed58617c17e09eac22cb96608c870f4
  • master default protected
  • atkis
  • development
  • marco/aquacrop-fix-api-use
  • precompile-statements
  • precompile-tools
  • tmp-faster-loading
  • skylark
  • testsuite
  • code-review
  • v0.8
  • v0.7.0
  • v0.6.1
  • v0.6.0
  • v0.5.5
  • v0.5.4
  • v0.5.3
  • v0.5.2
  • v0.2
  • v0.3.0
  • v0.4.1
  • v0.5
23 results

config.html

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    sim_all.Rd 2.45 KiB
    % Generated by roxygen2: do not edit by hand
    % Please edit documentation in R/sim_all.R
    \name{sim_all}
    \alias{sim_all}
    \title{Is a wrapper for sim_choice executing the simulation over all designs stored in a specific folder
    update}
    \usage{
    sim_all(
      nosim = 2,
      resps,
      destype = NULL,
      designpath,
      u,
      bcoeff,
      decisiongroups = c(0, 1),
      manipulations = list(),
      estimate = TRUE,
      chunks = 1
    )
    }
    \arguments{
    \item{nosim}{Number of runs or simulations. For testing use 2 but once you go serious, use at least 200, for better results use 2000.}
    
    \item{resps}{Number of respondents you want to simulate}
    
    \item{designpath}{The path to the folder where the designs are stored. For example "c:/myfancydec/Designs"}
    
    \item{u}{A list with utility functions. The list can incorporate as many decision rule groups as you want. However, each group must be in a list in this list. If you just use one group (the normal),  this  group still  has to be in a list in  the u list. As a convention name beta coefficients starting with a lower case "b"}
    
    \item{bcoeff}{List of initial coefficients for the utility function. List content/length can vary based on application, but should all begin with b and be the same as those entered in the utility functions}
    
    \item{decisiongroups}{A vector showing how decision groups are numerically distributed}
    
    \item{manipulations}{A variable to alter terms of the utility functions examples may be applying a factor or applying changes to terms selectively for different groups}
    
    \item{estimate}{If TRUE models will be estimated. If false only a dataset will be simulated. Default is true}
    
    \item{chunks}{The number of chunks determines how often results should be stored on disk as a safety measure to not loose simulations if models have already been estimated. For example, if no_sim is 100 and chunks = 2, the data will be saved on disk after 50 and after 100 runs.}
    }
    \value{
    A list, with all information on the simulation. This list an be easily processed by the user and in the rmarkdown template.
    }
    \description{
    Is a wrapper for sim_choice executing the simulation over all designs stored in a specific folder
    update
    }
    \examples{
    
     designpath<- system.file("extdata","Rbook" ,package = "simulateDCE")
     resps =240  # number of respondents
     nosim=2 # number of simulations to run (about 500 is minimum)
    
    
     bcoeff <-list(bsq=0.00,
         bredkite=-0.05,
         bdistance=0.50,
         bcost=-0.05,
         bfarm2=0.25,
         bfarm3=0.50,
         bheight2=0.25,
         bheight3=0.50)
    
    }