Learn R Programming

Infusion (version 2.1.0)

write_workflow: Workflow template

Description

codewrite_workflow writes a workflow script for inference. Beyond possibly saving some typing, this suggests what may be a reasonably good starting workflow. One should not expect to control all options of the workflow through the write_workflow arguments.

Usage

write_workflow(con = stdout(), lower, upper, nUnique, Simulate, simulator_args=NULL, ...)

Value

No return value. Used for the side-effect text, written to the connection.

Arguments

con

A connection object or a character string. Passed to writeLines.

lower

A named numeric vector of lower bounds for parameter space.

upper

A named numeric vector of upper bounds for parameter space.

nUnique

Number of simulations of the process (i.e. of rows of the reference table) in the first iteration.

Simulate

Function, or function name as a string. Sets the same-named add_reftable argument.

simulator_args

list of arguments for the simulator. Sets the ... in the add_reftable call.

...

Sets additional arguments in the refine call.

Examples

Run this code
  write_workflow(
    ## arguments for init_reftable():
    lower=c(logTh1=-2,logTh2=-2,logTh3=-2,logTh4=-2,ar=0.01,logMu=-5,MEANP=0.01),
    upper=c(logTh1=1, logTh2=1, logTh3=1, logTh4=1, ar=0.99,logMu=-2,MEANP=0.99),
    nUnique = 1000,
    #
    ## for add_reftable():
    Simulate="schtroumf",   # name of a user-defined R function
    simulator_args= list(   # Imagine that schtroumf() require arguments 'exe_path' and 'cmdline':
      exe_path="'path_to_smurf_executable'",      
      cmdline="'smurf.exe -a -b -c -d'"
    ),    # Do check the quotation marks in the output...
    #
    ## optional arguments for refine():    
    n=8000/3.2, CIs=TRUE, update_projectors=FALSE)

Run the code above in your browser using DataLab