I am investigating the distribution of a national minority across 25 regions. As such I need to compute the proportion living in each of these regions, with a confidence interval.
I enter the following code:
proc freq data=a; tables &var / binomial; weight kalvikt; title 'title'; output out=a1 binomial;
run;I do get estimated proportions for each region, but I only get the confidene interval for the very first region:
I would like to output the proportion and confidence interval for every region, with one region per row.
How would I go about this?
1 Answer
The output statement only processes the first variable from the TABLES statement.
Use ODS TRACE to find the names of the output objects being produced by PROC FREQ. ODS TRACE ON;
run your code and find the name of the output object that you are interested in.
Then use ODS OUTPUT object-name=SAS-dataset-name;
Looks like the name is binomial
Output Added:
-------------
Name: Binomial
Label: Binomial Proportion
Template: Base.Freq.BinomialStatFactoid
Path: Freq.Table1.Binomial
-------------