@linlin87 wrote:
But currently sampling approach does not account for this.
Are you referring to PaigeMiller's suggestion of sampling from the multivariate normal distribution? I think that this model could have the characteristics shown in your sample plot. Below is an example using only Base SAS and SAS/STAT (as I don't have a SAS/IML license). But, really, you should follow Rick_SAS's advice and precisely define the statistical model you are starting with.
/* Define mean vector and covariance matrix */
data cov(type=COV);
input _type_ $ _name_ $ y1-y4;
datalines;
COV y1 0.14 0.158 0.167 0.183
COV y2 0.158 0.22 0.235 0.263
COV y3 0.167 0.235 0.31 0.351
COV y4 0.183 0.263 0.351 0.49
MEAN . 1 1.72 2.42 3.52
;
/* Simulate data from the corresponding 4-dimensional normal distribution */
proc simnorm data=cov outsim=want numreal=100000 seed=2718;
var y1-y4;
run;
/* Prepare density plot */
proc transpose data=want out=trans;
by rnum;
run;
/* Prepare annotation to display the data of two simulated vectors:
rnum=46651 (representative of the 5% quantile of y1),
rnum=16395 (representative of the 95% quantile of y1). */
%sganno
data sgannodata;
%sgoval(x1=24.0, y1=76.1, height=2, width=2.6, linecolor="CX3F48CC", fillcolor="CX3F48CC", display="fill");
%sgoval(x1=31.3, y1=52.2);
%sgoval(x1=38.4, y1=28.3);
%sgoval(x1=50.7, y1=4.4);
%sgline(x1=24.0, x2=31.3, y1=76.1, y2=52.2, linethickness=1);
%sgline(x1=31.3, x2=38.4, y1=52.2, y2=28.3);
%sgline(x1=38.4, x2=50.7, y1=28.3, y2=4.4);
%sgoval(x1=38.1, y1=76.1, height=2, width=2.6, linecolor="CX00A2E8", fillcolor="CX00A2E8", display="fill");
%sgoval(x1=47.0, y1=52.2);
%sgoval(x1=56.0, y1=28.3);
%sgoval(x1=69.0, y1=4.4);
%sgline(x1=38.1, x2=47.0, y1=76.1, y2=52.2, linethickness=1);
%sgline(x1=47.0, x2=56.0, y1=52.2, y2=28.3);
%sgline(x1=56.0, x2=69.0, y1=28.3, y2=4.4);
run;
/* Create the annotated density plot */
proc sgpanel data=trans sganno=sgannodata noautolegend;
panelby _name_ / rows=4 columns=1 onepanel novarname;
colaxis display=(nolabel);
density col1 / type=kernel lineattrs=(color=black);
run;
Result:
... View more