Created
September 29, 2021 18:24
-
-
Save MJacobs1985/847eacb910557dc22c03d2e02d9d0d48 to your computer and use it in GitHub Desktop.
Simulations in SAS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Rsquared; | |
do i=1 to 1000 by 1; | |
x=rand("Normal"); | |
y=1-2*x + 1*x*x + rand("Normal"); | |
output; | |
end; | |
proc sgplot data=Rsquared; | |
scatter x=x y=y; | |
run; | |
proc reg data=Rsquared plots=fitplot; | |
model y=x; | |
run; | |
data Rsquared; | |
do i=1 to 1000 by 1; | |
x=rand("Normal"); | |
y=1-2*x + 0.5*x*x + rand("Normal"); | |
output; | |
end; | |
proc sgplot data=Rsquared; | |
scatter x=x y=y; | |
run; | |
proc reg data=Rsquared plots=fitplot; | |
model y=x; | |
run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment