a template repository for a dynamic statistical comparison
See https://github.com/stephens999/dscr-example for an example of a repo set up using this template
- Copy this repo. For example, suppose you want to call your repo
dscr-example
and host it on github. You could do the following:- create a new repo named
dscr-example
on your github account. - clone this repo to your locaal computer, under the directory
dscr-example
say, usinggit clone https://github.com/stephens999/dscr-template.git dscr-example
- set up your local repo to push to your github repo:
cd dscr-example
git remote rm origin
git remote add origin https://github.com/yourgithubid/dscr-example.git
- Push to your github repo using
git push -u origin master
- create a new repo named
- Put at least one datamaker function in a
.R
file in thedatamakers
directory (all.R
files in this directory will be sourced beforescenarios.R
). See the filedatamakers/eg_datamaker.R
for example. - Put at least one method function in a
.R
file in themethods
directory (all.R
files in this directory will be sourced before methods.R). See the filemethods/eg_method.R
- Edit the file
scenarios.R
to define your scenarios - Edit the file
methods.R
to define your methods - Edit the file
score.R
to define your scoring function - Replace the text in this
README.md
file with a description of the DSC. Include background, and definitions of the structure of the objectsmeta
,input
, andoutput
that is used by your DSC. A template for these instructions is included below. - Run your DSC by running
source("run_dsc.R")
in R. [Make sure you have installed thedscr
package first from https://github.com/stephens999/dscr]
Edit this template to provide specific details on your own DSC. I have included some instructions that might be generically applicable and useful for all DSCs (eg how to add a method, how to add a scenario).
For a general introduction to DSCs, see here.
Here provide general background on the problem that methods in this DSC are attempting to do. Provide enough detail so that someone could work out whether their method might be appropriate to add to the DSC.
This DSC uses the following formats:
input: list(name [type])
# Add more explanation of each element here
meta: list(name [type])
# Add more explanation of each element here
output: list(name [type])
# Add more explanation of each element here
Provide a summary of how methods are scored.
See score.R.
To add a method there are two steps.
- add a
.R
file containing an R function implenting that method to themethods/
subdirectory - add the method to the list of methods in the
methods.R
file.
Each method function must take arguments (input,args)
where input
is a list with the correct format (defined above), and args
is a list containing any additional arguments the method requires.
Each method function must return output
, where output
is a list with the correct format (defined above).
To add a scenario there are two steps, the first of which can be skipped if you are using an existing datamaker function
- add a
.R
file containing an R function implenting a datamaker to thedatamakers/
subdirectory - add the scenario to the list of scenarios in the
scenarios.R
file.
Each datamaker function must return a list(meta,input)
where meta
and input
are each lists with the correct format
(defined above).