BDMCMC PACKAGE Documentation

advertisement
BDMCMC R Package Documentation
Author: Prince Adu Agyeman
Date: June 1st 2011
Introduction:
This R package contains one function; bdmcmc.
R Functions and Data
---------------------------------------------------------------------bdmcmc
computes
bdmcmc
----------------------------------------------------------------------
Description :
This computes bdmcmc, returns a list of length 2 containing the datasets of the
generated common parameters and the pulse specific parameters.
This function also writes the generated generated common parameters and the
pulse specific parameters, each to an output file using the file name parameters passed
to it.
Usage:
datasets <- bdmcmc ( listOffileNames, priors, props, startingValues)
Arguments:
- listOffileNames : This is a vector of file names. [1] is the datasource file name ,
[2] is the output file name for the common parameters computed and [3] is the output
file name for the pulse specific parameters. (dataFileName,
outputfileNameForCommonParameters,outputfileNameForPulseSpecificParameters )
Example: listOffileNames <-c("model1e1.dat","c1.out","p1.out")
- priors
: This is a vector of all priors. ( priors_mean0 ,priors_mean1,
priors_var0_0 ,priors_var1_1, priors_c0_para0,priors_c0_para1, priors_c0_lim0,
priors_c0_lim1, priors_fe_mean0,priors_fe_mean1, priors_fe_precision0_0,
priors_fe_precision1_1priors_re_va1_1, priors_re_var0_1_and_1_0 , priors_re_var0_0
, priors_alpha , priors_beta )
Example : priors <c(1000.0,1000.0,1./12.0,1./12.0,1,1,0,2,2.5,0.5,1.0/1000.0,1.0/1000.0,
0,0.0001,0.0001)
- props
: This is a vector of all props. (
prop_pmd_var0_0,prop_pmd_var1_1, prop_pmd_var1_0_and_0_1,
prop_pmean_var0_0,prop_pmean_var1_1, prop_pmean_var1_0_and_0_1,
prop_A0_0, prop_A1_1, prop_A0_1_and_1_0, prop_c0_var)
Example: prop <- c(0.0015,0.13,0.90,1.3,3.0,0.0,0.02,2.2,0.5,0.0023)
- startingValues: a vector of starting values. startingValues <(rateToWriteInOutPutFiles, rateToPrintOnScreen,numberOfIterationsToRunMCMC ,
startingValueForBaseline , startingValueForHalfLife, mmm,
randomEffectsVarianceMatrixSize )
Example: startingValues <- c( 50,500,10000,2.5,45,3,5)
- rateToWriteInOutPutFiles : This is the rate to print output to output files
- rateToPrintOnScreen : This is the rate to print output on screen
- numberOfIterationsToRunMCMC : This is the number of iterations to run
mcmc
- startingValueForBaseline
: The starting value for baseline
- startingValueForHalfLife
: The starting value for half life
- mmm
: Defines the order statistic in the prior of
the pulse locations.
:
- randomEffectsVarianceMatrixSize : Size of the values in the S matrix for the
random effects variance
Details:
bdmcmc returns a list of length two which contains the datasets[1]: generated common
parameters and datasets[2]: the generated pulse specific parameters, hence must be
stored in a variable. example: datasets <- bdmcmc(x,y,z,startingvalues).
bdmcmc is a wrapper of a c++ function called bdmcmc which does all the computations
Download