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 pdf; | |
do x = -3 to 3 by 0.1; | |
y = pdf("Normal", x); | |
output; | |
end; | |
run; | |
proc sgplot data=pdf noautolegend; | |
title "Normal Probability Density"; | |
series x=x y=y; |
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 income2; | |
set 'C:/Users/ユーザー名/Desktop/income_analysis/income.sas7bdat' ; | |
run; |
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
libname income 'C:/Users/ユーザー名/Desktop/income_analysis' ; | |
data "income.sas7bdat"; | |
infile 'income.data'; | |
input gender race persinc; | |
if persinc = 99 then persinc=.; | |
run; |
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
****(1). Data exploration of iris flower data set****; | |
data iris; | |
set sashelp.iris; | |
run; | |
proc contents data=iris position; | |
run; | |
proc princomp data=iris out=iris_pca; | |
var Sepal: Petal:; |
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
proc datasets lib=work memtype=data; | |
save Ds1; | |
run; |
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
proc datasets lib=work memtype=data; | |
delete Ds1; | |
run; |
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
proc datasets lib=work kill memtype=data; | |
run; |
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
proc iml; | |
x = {1,0,3,2,0,3}; /* 6 × 1 ベクトル */ | |
A = J(6,1,1); /* 6 × 1ですべての要素が1の行列 */ | |
reg_data = A || x; /* Aとxを横に連結 */ | |
create DATA2 var {A x}; /* データセットを作る */ | |
append from reg_data; /* どの行列からデータを作るか */ | |
close DATA2; /* データセットを閉じる */ |
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
proc iml; | |
x = {1,0,3,2,0,3}; /* 6 × 1 ベクトル */ | |
A = J(6,1,1); /* 6 × 1ですべての要素が1の行列 */ | |
reg_data = A || x; /* Aとxを横に連結 */ | |
create DATA2 var {A x}; /* データセットを作る */ | |
append from reg_data; /* どの行列からデータを作るか */ | |
close DATA2; /* データセットを閉じる */ |
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
proc iml; | |
x = {1,0,3,2,0,3}; /* 6 × 1 ベクトル */ | |
y = {8,7,6,5,6}; /* 5 × 1 ベクトル */ | |
z = {A A A B B B}; /* 1 × 6 ベクトル */ | |
create DATA1 var {x y z}; /* データセットを作る */ | |
append; /* データをベクトルの中に入れる */ | |
close DATA1; /* データセットを閉じる */ | |
quit; |