How do get one confidence intervarl per variable value in PROC FREQ?

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:

enter image description here

enter image description here

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
-------------

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like