I've got a dataset with variables TYPE and FREQ. I'm trying to test on SAS if my variable FREQ follows a uniform distribution by variable = TYPE
TYPE FREQ
A 0
A 2
A 0
A 4
A 5
A 5
B 10
B 0
B 4
B 5
B 3
B 1
How should the SAS code work? I know I need to use proc univariate on beta distribution (1,1), but I cant get it to work if I want to test for uniform distribution by the 'TYPE' variable. Also, I want to use the range(freq)+2 as my sigma and min(freq)-1 as my theta parameters. How do I get it defined in my sas code?
PROC SQL NOPRINT; SELECT RANGE(freq)+2 INTO :SIGMA FROM dataset group by TYPE; QUIT;
PROC SQL NOPRINT; SELECT MIN(freq)-1 INTO :THETA FROM dataset group by TYPE; QUIT;
PROC UNIVARIATE DATA = dataset
BY type;
VAR freq;
HISTOGRAM freq / NOPLOT BETA ( W=1 L=1 COLOR=CX4B0082 SIGMA=&SIGMA THETA=&THETA ALPHA=1 BETA=1)
;
;
RUN; QUIT;
Appreciate any help please thanks!