/**************************************************************** * Programs for printint the covariance matrix * * * * This program is placed in the public domain * ********************************* Bill Rogers *** 04/23/91 ****/ #include "compiler.h" #include "inmat.h" #include int labheads; char parmdsn[64]; FILE *f_parmdsn; int debug=0; FILE *macopen(long *iddir, char *s); int main(argc,argv) int argc; char **argv; { int i; long iddir; #if defined(THINK_C) f_parmdsn = macopen(&iddir,"rb"); #else if (argv[1]) strcpy(parmdsn,argv[1]); f_parmdsn = fopen(parmdsn,"rb"); #endif if (!f_parmdsn) { printf("Unable to open dataset %s\n", parmdsn); exit(1); } inparmf(f_parmdsn); covar_run(); } #include covar_run() { int i,j,iiv,iis,jjv,jjs,ij; double dd; printf(" Error flag = %d\n\n", error_flag); printf(" Model ID = %d\n\n", modelid); printf(" Number of free parameters = %d\n\n", actparm); printf(" Number of observations = %g\n\n", nobs); printf(" Number of structural parameters = %d\n\n", nsp); printf(" Number of dependent variables = %d\n\n", ndv); printf(" Numver of independent variables = %d\n\n", vars); printf(" Number of extra values = %d\n\n", n_extra_vals); printf(" Length of read list = %d\n\n", lreadv); printf(" Label heads included? = %d\n\n", labheads1); printf(" Input dataset type = %d\n\n", intype); printf("Names of the structural parameters:\n"); for (i=0; i0.0) dd = sqrt(dd); else dd = 1.0; printf(" %8s.%-8s %8s.%-8s %14g %12.5f\n", &varnames[9*iiv], &spnames[9*iis], &varnames[9*jjv], &spnames[9*jjs], a[ij], a[ij]/dd); } } printf("\n"); } void mxerrors(f,i,s) FILE *f; int i; char *s; { fprintf(f,"Error %d: ", i); switch(i) { case 3: fprintf(f,"Unable to open data file: %s\n", s); break; case 18: fprintf(f,"Independent variable <%s> missing from dataset\n", s); break; case 19: fprintf(f,"Dependent variable <%s> missing from dataset\n", s); break; case 20: fprintf(f,"Weighting variable <%s> missing from dataset\n", s); break; default: fprintf(f,"Unknown error %d, text: %s\n", i, s); break; } } void mxerror(i,s) int i; char *s; { mxerrors(stderr,i,s); /* mxerrors(logf,i,s); */ /* fclose(logf); */ exit(i); }