!********************************************
!***Routine for Predicted Effects Variable***
!********************************************
	REAL*8 FUNCTION MODELCALC(XCURR,PARMMODEL)
	USE SHAREDVARS
	REAL*8 XCURR,PARMMODEL(4)
	REAL*8 PARMDIST(3),CUMPROB,CUMPROBREF,Y0
	REAL*8 FSUSC/0.9999D0/       				!***0.01% assumed resistant at high concentrations to avoid computation problems
	INTEGER IPARM
	EXTERNAL DIST_CUMPROB
	DO IPARM=2,4
		PARMDIST(IPARM-1)=PARMMODEL(IPARM)
	ENDDO
	CALL DIST_CUMPROB(XCURR,PARMDIST,CUMPROB)
      IF(FIXLINE.EQ.0) THEN
         	Y0=PARMMODEL(1)
      ELSE
		Y0HIFLAG=.FALSE.
		CALL DIST_CUMPROB(DBLE(XLINE(FIXLINE)),PARMDIST,CUMPROBREF)
       	Y0=PARMMODEL(1)/(1-CUMPROBREF)
		IF(Y0.GT.1D0) THEN
			Y0HIFLAG=.TRUE.
		ENDIF
      ENDIF
	MODELCALC=Y0*(1-FSUSC*CUMPROB)
	RETURN
	END
