#include extern double par[250], pri; extern int npar; void repar(double *theta, int *nk) /* This routine is used to reparameterize the model, if desired. (Reparameterization is often desirable to make the form of the posterior closer to a multivariate normal. See documentation in directory above.) The code in this file is used for the univariate regression model; editing is required for new models. If parameters are not transformed, it is still necessary to copy the appropriate information from par into theta and return nk. Inputs (external) pri Logarithm of prior distribution at current parameter vector par Current record read from posterior simulation file; parameter values are typically contained within this record. npar Number of elements in par Outputs: pri Logarithm of prior distribution at transformed current parameter vector theta Transformed parameter vector nk Number of elements in transformed parameter vector */ { int i=1; *nk=npar/2; dcopy_(nk,par,&i,theta,&i); *nk=*nk+1; theta[*nk-1]=log(par[npar-1]); pri = pri + theta[*nk-1]; } void repar0() /* This procedure is typically used to read from file information that may be required to interpret par in repar(). repar0() is entered once, before repar(). */ { } int lrange(int nk, double *theta, int *lall) /* This function indicates whether or not a parameter vector (as reparameterized in repar) is in the support of the prior Inputs: nk Number of parameters in the vector theta Parameter vector Outputs: lall Set 1 if theta in Euclidean nk-space is in the support of the prior; otherwise set 0 lrange Set 1 if theta is in the support of the prior, else 0 */ { *lall=1; return 1; }