Skip to content

Instantly share code, notes, and snippets.

@dbetebenner
Created February 6, 2013 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dbetebenner/4721271 to your computer and use it in GitHub Desktop.
Save dbetebenner/4721271 to your computer and use it in GitHub Desktop.
Script to test simex functionality using parallel processing and sgpData_LONG
##############################################################################################
###
### Test script of Simex functionality
###
##############################################################################################
### Load SGP package
require(SGP)
options(error=recover)
### prepareSGP
Demonstration_SGP_Simex <- prepareSGP(sgpData_LONG)
### analyzeSGP
Demonstration_SGP_Simex <- analyzeSGP(Demonstration_SGP_Simex,
sgp.percentiles=TRUE,
sgp.projections = FALSE,
sgp.projections.lagged = FALSE,
sgp.percentiles.baseline = FALSE,
sgp.projections.baseline = FALSE,
sgp.projections.lagged.baseline = FALSE,
simulate.sgps=FALSE,
calculate.simex=list(state="DEMO",lambda=seq(0,2,0.5), simulation.iterations=25, extrapolation="linear"),
goodness.of.fit.print=FALSE,
parallel.config=list(BACKEND="PARALLEL", WORKERS=list(PERCENTILES=20)))
### combineSGP
Demonstration_SGP_Simex <- combineSGP(Demonstration_SGP_Simex)
### Save results
save(Demonstration_SGP_Simex, file="Demonstration_SGP_Simex.Rdata")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment