From the course: SAS Programming for R Users, Part 1

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Demo: Determining power using simulation

Demo: Determining power using simulation - SAS Tutorial

From the course: SAS Programming for R Users, Part 1

Demo: Determining power using simulation

- [Trainer] Let's stay in IML, and this time instead of doing a fun poker simulation let's actually use IML to determine the power in a multiple linear regression setting using simulation. So in this example, I have a multiple linear regression model with three covariates, and I want to determine the power of the first coefficient, after controlling for the other two. And remember, the power is just the probability of correctly rejecting the null hypothesis, that that specific parameter is equal to zero. So enter into proc iml, we're going to do 1000 simulations. I'll set a seed. Each dataset will have 30 observations and I'm going to specify the mean, correlation, variance and vector of parameters, as well as my residual variance here. So assume I read an article and I wanted to specify these parameters explicitly. Next I'm going to use functions very similar to R, like diag, square root, and so on. Here we use the star operator to do matrix multiplication IML, which is a little bit…

Contents