Programming the statistical procedures from SAS

Restricting analysis to only one gende?

Reply
N/A
Posts: 1

Restricting analysis to only one gende?

The values of hemoglobin for sex "males and females" for three treatment insulin, tablets and insulin were measured. In the data set the 0=male and 1= female, 1= insulin, 2=tablets, 3= diet. I want to compare the mean of hemoglobin for each of the treatment groups and restricting the analysis to men only (e.g to include if sex=0). My question where to include sex=0 to analysis only the men?

Proc format;
Value sexf 0='male'
1='female'

value treatf 1='c insulin'
2='b tablet'
3=' a diet'
run;
data diabet;
infile ' -----------------'
input age sex treat haem;
attrib sex format=sexf. treat format=treatf.;
run;
proc means
class treat;
var haem;
run;
Trusted Advisor
Posts: 2,114

Re: Restricting analysis to only one gende?

Ask a Question
Discussion stats
  • 1 reply
  • 88 views
  • 0 likes
  • 2 in conversation