BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
4 REPLIES 4
Paige
Quartz | Level 8
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.
deleted_user
Not applicable
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.
Paige
Quartz | Level 8
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;
deleted_user
Not applicable
Thanks for the help. I just hope that my description of the problem was right...

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 688 views
  • 0 likes
  • 2 in conversation