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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Introduction to SAS and SAS Studio3m 12s
-
(Locked)
Demo: Working in SAS Studio3m 40s
-
(Locked)
Demo: Writing a program in SAS Studio5m 44s
-
(Locked)
Demo: Using tasks and snippets in SAS Studio5m 47s
-
Demo: Bayesian Logistic Regression7m 14s
-
(Locked)
Demo: Poker simulation4m 37s
-
(Locked)
Demo: Determining power using simulation3m 15s
-
(Locked)
Demo: Calling R from SAS2m 15s
-
(Locked)
SAS libraries and user-defined libraries4m 27s
-
(Locked)
SAS procedure syntax1m 24s
-
(Locked)
Getting programming help53s
-
(Locked)
Demo: Navigating the online documentation2m 49s
-
-
-