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?
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
Hi, Thanks for responding. It's not the mean value I want per runner. I was the ratio for each runner.
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.
My sample data look like this:
runner_name | run trial | observed time (minutes) | expected time (minutes) |
name1 | 1 | 10 | 15 |
name1 | 2 | 20 | 32 |
name2 | 1 | 25 | 45 |
name2 | 2 | 30 | 7 |
name3 | 1 | 45 | 5 |
name3 | 2 | 3 | 8 |
name3 | 3 | 51 | 9 |
name3 | 4 | 87 | 1 |
name3 | 5 | 12 | 12 |
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.
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.
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.
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.