BookmarkSubscribeRSS Feed
sharonlee
Quartz | Level 8

I have a simplified dataset: runner name, run trial (there are 10 trials), observed time for each trial, expected time for each trial.

I sum up my observed and expected times using proc means and output a dataset.I then use the data statement to calculated a ratio for observed / expected for each runner. how do i calculate a confidence interval to see if there is a difference in o/e between my runners? 

5 REPLIES 5
PeterClemmensen
Tourmaline | Level 20

I'm not sure if this is what you are efter, but you can request confidence limits for the mean by specifying the CLM option in the PROC MEANS statement.

 

An example is in the PROC MEANS documentation here

 

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473542.htm

sharonlee
Quartz | Level 8

Hi, Thanks for responding. It's not the mean value I want per runner. I was the ratio for each runner.

Rick_SAS
SAS Super FREQ

You should post some sample data, which will make it easier for people to help you.

 

You might consider the difference in the runner's time, rather than the ratio. If you have several runners and you want to compare their mean times and determine if the mean times are significantly different, you can use PROC GLM to run an ANOVA and a multiple comparison of means. There are several examples in the PROC GLM doc, including one that treats repeated observations.

 

sharonlee
Quartz | Level 8

My sample data look like this:

runner_namerun trialobserved time (minutes)expected time (minutes)
name111015
name122032
name212545
name22307
name31455
name3238
name33519
name34871
name351212

 

I sum up my observed and expected times using proc means and output a dataset.I then use the data statement to calculated a ratio for observed / expected for each runner. 

 

I want to see if my overall observed/expected ratio is significantly different between runners. I'd like to generate 95% confidence intervals. Can I do this in SAS? This is not a binomial proportion so i can't use proc freq to calculate CIs.

 

 

mkeintz
PROC Star

Given the irregular values in your table of expected run times, I presume your runners are not all running the same set of distances, ... or are otherwise not subjected to the same set of running conditions.  So I can see why you are considering O/E  instead of O-E.  But maybe if O is a predictor var, you can still use O-E as the dependent var.

 

 

 

 

 

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 5 replies
  • 1362 views
  • 0 likes
  • 4 in conversation