* lrtpvalue.sas;
options pageno=1 linesize=80;
title "P-value for likelihood ratio test";
data values;
	*Data are -2lnL values under H0 and H1, plus degrees of freedom;
	input m2lnLH1 m2lnLH0 df;
	m2lnl = -m2lnLH1 - (-m2lnLH0);
	* Find P-value;
	Pvalue = (1 - probchi(m2lnl,df))/2;
	datalines;
39.0 47.4 1
;
run;
proc print data=values;
run;
