I have used this for program for copula simulation
data returns;
input ret_x ret_y ret_z;
cards;
0.004182 0.003503 0.584
-0.027960 -0.000582 0.54
0.006732 0.025611 0.14
-0.033435 -0.002838 -0.24
0.029560 0.010814 -0.4
-0.003054 -0.001689 0.8
-0.012255 -0.012408 0.9
0.013958 0.003427 0.14
-0.011318 -0.017075 0.14
-0.022587 0.002316 0.28
;
/* Copula estimation */
proc copula data = returns;
var ret_x ret_y ret_z;
fit normal / outcopula=estimates;
/* keep only correlation estimates */
data estimates;
set estimates;
keep ret_x ret_y ret_z;
/* Copula simulation */
proc copula;
var ret_x ret_y ret_z;
define cop normal (cor = estimates);
simulate cop / ndraws = 500
outuniform = simulated_uniforms
plots=(data=uniform scatter);
run;
Got this log :
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 data returns;
72 input ret_x ret_y ret_z;
73 cards;
NOTE: The data set WORK.RETURNS has 10 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 521.87k
OS Memory 28840.00k
Timestamp 03/30/2018 10:48:35 AM
Step Count 50 Switch Count 2
Page Faults 0
Page Reclaims 131
Page Swaps 0
Voluntary Context Switches 10
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 272
84 ;
85 /* Copula estimation */
86 proc copula data = returns;
87 var ret_x ret_y ret_z;
88 fit normal / outcopula=estimates;
89 /* keep only correlation estimates */
NOTE: The data set WORK.ESTIMATES has 3 observations and 9 variables.
NOTE: PROCEDURE COPULA used (Total process time):
real time 0.04 seconds
user cpu time 0.04 seconds
system cpu time 0.00 seconds
memory 2572.53k
OS Memory 30124.00k
Timestamp 03/30/2018 10:48:35 AM
Step Count 51 Switch Count 2
Page Faults 0
Page Reclaims 517
Page Swaps 0
Voluntary Context Switches 9
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 272
90 data estimates;
91 set estimates;
92 keep ret_x ret_y ret_z;
93 /* Copula simulation */
NOTE: There were 3 observations read from the data set WORK.ESTIMATES.
NOTE: The data set WORK.ESTIMATES has 3 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 801.06k
OS Memory 30124.00k
Timestamp 03/30/2018 10:48:35 AM
Step Count 52 Switch Count 2
Page Faults 0
Page Reclaims 143
Page Swaps 0
Voluntary Context Switches 9
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
94 proc copula;
95 var ret_x ret_y ret_z;
96 define cop normal (cor = estimates);
___
1
WARNING 1-322: Assuming the symbol CORR was misspelled as cor.
97 simulate cop / ndraws = 500
98 outuniform = simulated_uniforms
99 plots=(data=uniform scatter);
____
22
202
ERROR 22-322: Syntax error, expecting one of the following: ), DATATYPE, DISTRIBUTION, NONE.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
100 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.SIMULATED_UNIFORMS may be incomplete. When this step was stopped there were 0 observations and 0
variables.
WARNING: Data set WORK.SIMULATED_UNIFORMS was not replaced because this step was stopped.
NOTE: PROCEDURE COPULA used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 339.25k
OS Memory 29864.00k
Timestamp 03/30/2018 10:48:35 AM
Step Count 53 Switch Count 0
Page Faults 0
Page Reclaims 52
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 16
101
102
103 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
115
Please help me to solve this and help me to add same data using excel sheet.