Specifically one that shows how to do the math described by N. Cressie, T.R.C. Read, in their paper entitled
"Multinomial goodness-of-fit tests," J. Roy. Statist. Soc. B 46 (1984) 440–464.
I do have code now for 4 of the 5 test statistics I need.
but I have not been able to find the Power divergence test show in the image attached here. I found some R code so maybe I can run it inside SAS enterprise guide? But I do NOT have a SAS/IML or SAS Enterprise Miner license so I can not run the R code inside a node that way. Please advise.
It can be computed with a SQL query from proc freq output. For example
proc freq data=sashelp.heart;
where weight_status is not missing;
table sex*weight_status / out=cellcounts outexpect;
run;
%let lambda=(2/3);
proc sql;
select
&lambda as lambda,
2/(&lambda*(1+&lambda))*sum(COUNT*((COUNT/EXPECTED)**&lambda-1)) as powerDivergence
from cellCounts;
quit;
It can be computed with a SQL query from proc freq output. For example
proc freq data=sashelp.heart;
where weight_status is not missing;
table sex*weight_status / out=cellcounts outexpect;
run;
%let lambda=(2/3);
proc sql;
select
&lambda as lambda,
2/(&lambda*(1+&lambda))*sum(COUNT*((COUNT/EXPECTED)**&lambda-1)) as powerDivergence
from cellCounts;
quit;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.