BookmarkSubscribeRSS Feed
kuridisanjeev
Quartz | Level 8

Hi All.

As i am regular user for Base SAS,SQL and Macros but i did't come across to Statistical procedures.

Today my client came up with me a report ,in that i need to show some statistical columns which are LS MEANS ,95%CI and p-value.

CLient requirement looks likes bellow..

ActlevelNmeanSDLS MEAN95 % CIp-value
        HIGHxxxx.xxx.xxxxx.xx(xx.xx,xx.xx)x.xxxx
       LOWxxxx.xxx.xxxxx.xx(xx.xx,xx.xx)x.xxxx
       MODxxxx.xxx.xxxxx.xx(xx.xx,xx.xx)x.xxxx

Could you please provide sample code to get above statistics as i dod't have much time to go through the statistical procedures.

please use SASUSER.ADMIT dataset to generate above table then i can adopt that code for my original dataset.

Any help you can give would be greatly appreciated

Note :

Confidence Interval from the ANCOVA model.

$=p-Value from the ANCOVA model.



Thanks &Regards.

Sanjeev.K

4 REPLIES 4
AncaTilea
Pyrite | Level 9

Hi.

I don't have access to sasuser.admit;

so,I used sashelp.class (which is not suitable for what you want, but it will give you an idea);

proc glm data = sashelp.class;

class sex; *need to put your group variable in the class statement

    model age = sex;

    lsmeans sex/stderr cl;

run;quit;

Good luck!

Anca.

kuridisanjeev
Quartz | Level 8

Hi Anca ..

thank you so much for your rply..

here i am attaching Admit Dataset. Could you please try on this.

and i have few quires on your provided solution..

>Is this values based on ANCOVA model ???

>Is this possible to get output dataset with these values ???

once again thank you for your response ..

Regards.

Sanjeev.K

AncaTilea
Pyrite | Level 9

So, here is for example one link that shows ANCOVA analysis with SAS:

http://www.stat.sc.edu/~hitchcock/crackersasexample.txt

and this one:

SAS/STAT(R) 9.2 User's Guide, Second Edition

What I need to know from you is what is your X (independent variable) and what is your Y (dependent variable)? I assume that your X is the ActLevel (as per the sasuser.admit data set).

But what is the Y?

What I mean is that you need to set up a (simple) model where the group variable is your X and you need a Y so you can conclude if there are differences in Y between the X's groups.

Anyway....

Yes, there are ways to output the results by using either ods statement or the output out...

FidaHussain
Calcite | Level 5

Hi ,

I am facing the same problem can you please share code with me

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 4 replies
  • 4450 views
  • 3 likes
  • 3 in conversation