SUBROUTINE REPAR(THETA,NK) C This routine is used to reparameterize the model, if desired. C (Reparameterization is often desirable to make the form of the posterior C closer to a multivariate normal. See documentation in directory above.) C The code in this file is used for the univariate regression model; C editing is required for new models. C Users of bacc/models note that this code is provided in all cases, C in a file pars.f. It is not necessary to create pars.f for these models. C If parameters are not transformed, it is still necessary to copy the C appropriate information from PAR into THETA and return NK. C Inputs /AAML/ C PRI Logarithm of prior distribution at current parameter vector C PAR Current record read from posterior simulation file; C parameter values are typically contained within this record. C NPAR Number of elements in PAR C Outputs: C PRI Logarithm of prior distribution at transformed current parameter C vector C THETA Transformed parameter vector C NK Number of elements in transformed parameter vector IMPLICIT REAL*8 (A-H,O-Z) COMMON/AAML/WT,PRI,PDAT,PAR(250),ITER,NPAR,LWRITE LOGICAL LWRITE DIMENSION THETA(NPAR) NK=NPAR/2+1 CALL DCOPY(NK-1,PAR,1,THETA,1) THETA(NK)=DLOG(PAR(NPAR)) PRI=PRI+DLOG(PAR(NPAR)) RETURN C C This entry point is typically used to read from file information that C may be required to interpret PAR in REPAR. REPAR0 is entered once, C before REPAR. Fortran programmers may consult models/*/repar.f for C examples. ENTRY REPAR0 RETURN END C C This function indicates whether or not a parameter vector (as C reparameterized in REPAR) is in the support of the prior. C Inputs: C NK Number of parameters in the vector C THETA Parameter vector C Outputs C LALL Set .TRUE. if any THETA in Euclidean NK-space is in the C support of the prior; otherwise set .FALSE. C LRANGE Set .TRUE. if THETA is in the support of the prior, elso .FALSE. LOGICAL FUNCTION LRANGE(NK,THETA,LALL) IMPLICIT REAL*8 (A-H,O-Z) DIMENSION THETA(NK) LOGICAL LALL LALL=.TRUE. LRANGE=.TRUE. RETURN END