BookmarkSubscribeRSS Feed
HG
Calcite | Level 5 HG
Calcite | Level 5

Hi All,

I was asked to get P-values. Below is my sample data. My real data have more than 1000 observations and other variables. What procedures should I use? my variables are continuous variables.   All suggestions are much appreciated!

data have;

input var1 age;

cards;

50 20

55 21

70 25

80 18

90 19

40 50

30 60

70 25

20 80

15 90

20 70

100 18

110 21

130 20

5 90

;

proc means data= have noprint;

var var1;

output out=q p25= p50= p75=/autoname;

run;

data temp;

set have;

if var1<20 then group=1;

   else if var1<55 then group=2;

     else if var1<90 then group=3;

         else group=4;

  run;

  proc print;run;

proc sql;

  select group,count(*) as n, mean(var1) as m_var1,mean(age) as m_age

    from temp

        group by group;

quit;

/* output  */

                           group         n m_var1     m_age

                         ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ

                             1         2        10        90

                             2         5        32        56

                             3         4     68.75     22.25

                             4         4     107.5      19.5

        var1 by group

1

2

3

4

P- value

N

2

5

4

4

Var1(mean)

10

32

68

107

???

Age (mean)

90

56

22

19

???

Other

???

1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12

HG,

In order for us to help you with the appropriate procedure for your data, we really need to better understand the question.

For instance,

Do you want to know if

is var1 is correlated with age?  There are several statistical tests for that, some with different underlying assumptions.

is age different by group membership?  also several statistical tests.

Doc Muhlbaier

Duke

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1508 views
  • 0 likes
  • 2 in conversation