Date: Wed, 30 Aug 2006 09:55:17 -0700
Reply-To: David Neal <afdbn@UAA.ALASKA.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David Neal <afdbn@UAA.ALASKA.EDU>
Subject: Re: need help in analysing this data
In-Reply-To: <1156954437.650114.131230@p79g2000cwp.googlegroups.com>
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Sharada,
The reason SAS isn't computing a correlation is that the values for
VIGNO are ALL the same. Look at the standard deviation for VIGNO. The
only way you can get a 0 standard deviation is if all the values are the
same. You probably have something wrong with your data. with only 91
subjects, it might be worth it to just do a quick printout of your data
to see where you stand. Additionally, if you want to look at each sex
individually, you need to use a "by" statement on a sorted dataset.
Something like:
proc sort data=nhis;
by sex;
run;
proc corr data=nhis;
var JNTYR VIGNO;
by sex;
run;
I'd recommend you pick up a copy of 'The Little SAS Book" by Lora
Delwiche and Susan Slaughter. If you can, try to get the third
edition. You should sit down and go through it. It will answer a lot
of basic questions and provide a nice little reference book for you to
use as you continue to build your skills. I'm not saying that you
shouldn't ask your questions on SAS-L, I'm just saying that an
additional resource that covers the basics might help you get on your
feet quicker when it comes to SAS.
David Neal
sharada wrote:
> Hi,
>
> I had some problem yesterday in finding a correlation between two
> variables and sorting them out by variable sex. After I did correlate I
> have this output:
>
> CORRELATION BETWEEN ANKLE PAIN AND ENGAGING IN VIGOROUS ACTIVITY
>
> The CORR Procedure
> 1 With Variables: SEX
> 2 Variables: JNTYR VIGNO
> Simple Statistics
>
> Variable N Mean Std Dev Sum
> Minimum Maximum
>
> SEX 91 1.60440 0.49169 146.00000
> 1.00000 2.00000
> JNTYR 91 1.72527 0.44885 157.00000
> 1.00000 2.00000
> VIGNO 91 301.00000 0 27391
> 301.00000 301.00000
>
> Simple Statistics
> Variable Label
> SEX Sex
> JNTYR Had pain/aching at joints, past 12
> m
> VIGNO Freq vigorous activity: # of units
> Pearson Correlation Coefficients, N = 91
> Prob > |r| under H0: Rho=0
> JNTYR VIGNO
> SEX -0.04481 .
> Sex 0.6732 .
>
> JNTYR is having pain, aching, stiffness or swelling in or around a
> joint?
> VIGNO is VIGOROUS activities for AT LEAST 10 MINUTES that cause
> HEAVYsweating or LARGE increases in breathing or heart rate
> I need help in analysing this output. The correlation between vigno and
> sex is blank. So does that mean that there is no correlation between
> sex and vigno. Or is it possible that the survey from which the data
> was taken did not collect data seperately with respect to gender.
>
> The program I have written to get this out put is : PROC CORR
> DATA=NHIS;
> TITLE 'CORRELATION BETWEEN ANKLE PAIN AND ENGAGING IN VIGOROUS
> ACTIVITY';
> WITH SEX;
> VAR JNTYR VIGNO;
> RUN;
> If I want the data to be split by sex (i.e; male and female) what
> options do I have to specify?
> Thanks in advance
> Sharada
>
|