Not applicable
Posts: 0

# SAS problem at university T-Test(?)

Hi!

We are group of students at Stockholm University and we are supposed to do some calculations with SAS. We don't really know how to solve the problem so we thought that we might can get some help here.

We got over the point where we did the dataline thing. We have two varaibels. Sex and attidute towards a building project. We have to estimate the proportion towards the building project. We also have to examinate if the proportion of the attidude is different for men and women according to the building project.

The population is 101 men and 109 women so we know that we have to calculate it with something like:

(x-y)/s but we don't know how to do that with SAS.

We would be really greatful for some help...

Thomas and the rest of the group.
Super Contributor
Posts: 281

## Re: SAS problem at university T-Test(?)

First of all, this is not a t-test. It is a comparison of two binomial proportions. You might want to look that up in a statistics text.

How to do this in SAS? Well, that's a very broad question, and not knowing how far you have gone already, I can't really be terribly specific. Look in the documentation for PROC FREQ for comparing two proportions.
Not applicable
Posts: 0

## Re: SAS problem at university T-Test(?)

Well we are in the middle of the first term, so we didn't get that long. There are more variabels by the way... Now it looks like that: (inkomst = income, inställning_bygge = attitude towards the building project).

data work.inl2;
input sex age inkomst installning_bygge;
datalines;
1 34 25022.65 1
more datalines
;
run;

Then we tried something like that:

proc sort data=work.inl2;
by sex;
run;

proc means data=work.inl2 CLM mean std stderr;
var sex;
freq installning_bygge;
by sex;

But the result we got wasn't what we wanted. We have to finish it until Thursday and really no one knows how to do it...
If you could give us just one way to solve that problem we would thankfully take it.
Super Contributor
Posts: 281

## Re: SAS problem at university T-Test(?)

As I said before, this is not a t-test (unless your description of the problem is wrong). It is a comparison of two proportions, which can be done via a chi-squared test.

proc freq data=inl2;
tables sex*installning_bygge/chisq;
run;
Not applicable
Posts: 0

## Re: SAS problem at university T-Test(?)

Thanks for the help. I just hope that my description of the problem was right...
Discussion stats
• 4 replies
• 155 views
• 0 likes
• 2 in conversation