version 1.13, 2013/03/08 07:32:28 |
version 1.14, 2014/02/25 05:25:39 |
|
|
/* |
/* |
$OpenXM: OpenXM/src/hgm/mh/src/wmain.c,v 1.12 2013/03/08 04:54:01 takayama Exp $ |
$OpenXM: OpenXM/src/hgm/mh/src/wmain.c,v 1.13 2013/03/08 07:32:28 takayama Exp $ |
License: LGPL |
License: LGPL |
*/ |
*/ |
#include <stdio.h> |
#include <stdio.h> |
Line 156 struct MH_RESULT *mh_main(int argc,char *argv[]) { |
|
Line 156 struct MH_RESULT *mh_main(int argc,char *argv[]) { |
|
|
|
int mh_usage() { |
int mh_usage() { |
fprintf(stderr,"Usages:\n"); |
fprintf(stderr,"Usages:\n"); |
fprintf(stderr,"w-m [--idata input_data_file --gnuplotf gnuplot_file_name\n"); |
fprintf(stderr,"hgm_w-n [--idata input_data_file --gnuplotf gnuplot_file_name\n"); |
fprintf(stderr," --dataf output_data_file --raw --xmax xmax --test m --step h]\n"); |
fprintf(stderr," --dataf output_data_file --raw --xmax xmax --test m --step h]\n"); |
fprintf(stderr,"[ --95 --verbose] \n"); |
fprintf(stderr,"[ --95 --verbose] \n"); |
fprintf(stderr,"--raw does not add data parameters to the output_data_file.\n"); |
fprintf(stderr,"--raw does not add data parameters to the output_data_file.\n"); |
fprintf(stderr,"\nThe command w-m [options] evaluates Pr({y | y<xmax}), which is the cumulative distribution function of the largest root of the m by m Wishart matrix with n degrees of freedom and the covariantce matrix sigma.\n"); |
fprintf(stderr,"\nThe command hgm_w-n [options] evaluates Pr({y | y<xmax}), which is the cumulative distribution function of the largest root of the m by m Wishart matrix with n degrees of freedom and the covariantce matrix sigma.\n"); |
fprintf(stderr,"All the eigenvalues of sigma must be simple.\n"); |
fprintf(stderr,"All the eigenvalues of sigma must be simple.\n"); |
fprintf(stderr,"Parameters are specified by the input_data_file.\n"); |
fprintf(stderr,"Parameters are specified by the input_data_file.\n"); |
fprintf(stderr,"The format of the input_data_file.\n"); |
fprintf(stderr,"The format of the input_data_file, which should be generated by the command hgm_jack-n.\n"); |
fprintf(stderr," MH_Mg: m, MH_Beta: beta=sigma^(-1)/2 (diagonized), MH_Ng: n, Iv: initial values at MH_X0g*MH_Beta (see our paper how to order them), \n"); |
fprintf(stderr," MH_Mg: m, MH_Beta: beta=sigma^(-1)/2 (diagonized), MH_Ng: n, MH_X0g: starting value of x,\n"); |
|
fprintf(stderr," Iv: initial values at MH_X0g*MH_Beta (see our paper how to order them), \n"); |
fprintf(stderr," Ef: a scalar factor to the initial value. It may set to 1.\n"); |
fprintf(stderr," Ef: a scalar factor to the initial value. It may set to 1.\n"); |
fprintf(stderr," MH_Hg: h (step size), MH_X0g: starting value of x, Xng: terminating value of x\n"); |
fprintf(stderr," MH_Hg: h (step size),\n"); |
fprintf(stderr," MH_Dp: output data is stored in every MH_Dp steps when output_data_file is specified.\n"); |
fprintf(stderr," MH_Dp: output data is stored in every MH_Dp steps when output_data_file is specified.\n"); |
|
fprintf(stderr," Xng: terminating value of x.\n"); |
fprintf(stderr," --95: output the 95%% point. --verbose: verbose mode.\n"); |
fprintf(stderr," --95: output the 95%% point. --verbose: verbose mode.\n"); |
fprintf(stderr," The line started with %% is a comment line.\n"); |
fprintf(stderr," The line started with %% is a comment line.\n"); |
fprintf(stderr," An example format of the input_data_file can be obtained by executing w-2 with no option.\n"); |
fprintf(stderr," An example format of the input_data_file can be obtained by executing w-2 with no option.\n"); |
fprintf(stderr,"\nExamples:\n"); |
fprintf(stderr,"\nExamples:\n"); |
fprintf(stderr,"[1] ./w-2 \n"); |
fprintf(stderr,"[1] ./hgm_w-n \n"); |
fprintf(stderr,"[2] ./w-2 --xmax 20\n"); |
fprintf(stderr,"[2] ./hgm_w-n --xmax 20\n"); |
fprintf(stderr,"[3] ./w-6 --test 6\n"); |
fprintf(stderr,"[3] ./hgm_w-n --test 6\n"); |
fprintf(stderr," A test run of w-6.\n"); |
fprintf(stderr," A test run in Mg=6.\n"); |
fprintf(stderr," The number m and mm must agree for ./w-m --test mm.\n"); |
fprintf(stderr,"[4] ./hgm_jack-n --idata Testdata/tmp-idata3.txt --degree 15 >t.txt\n"); |
fprintf(stderr,"[4] ./w-5 --idata tmp-inm-m5* --gnuplot tmp-graph\n"); |
fprintf(stderr," ./hgm_w-n --idata t.txt --gnuplotf test-g\n"); |
fprintf(stderr," tmp-inm-m5* is a sample input data distributed with this file.\n"); |
fprintf(stderr," gnuplot -persist <test-g-gp.txt\n"); |
fprintf(stderr," tmp-graph-gp.txt is an input file of the gnuplot\n"); |
fprintf(stderr," tmp-idata3.txt is a sample input data distributed with this file.\n"); |
fprintf(stderr," It can be executed with the load command in the gnuplot.\n"); |
fprintf(stderr," test-g-gp.txt is an input file of the gnuplot\n"); |
fprintf(stderr," tmp-graph is the table of x and the values of Pr({y | y<x}).\n"); |
fprintf(stderr," test-g is the table of x and the values of Pr({y | y<x}).\n"); |
} |
} |
|
|
static int setParamTest() { |
static int setParamTest() { |