Hi, I'm trying to create a heat map using spearman correlations, but am getting the following errors when running sgrender: java.lang.ArrayIndexOutOfBoundsException: 3 ERROR: Physical file does not exist, /tmp/SAS_work50EB00006B2C_localhost.localdomain/_4D29A1B845FFE4BBCA177128127DE4A.bmp. When I try to run the same code calling for pearson, it works perfectly. Does anyone know why this error occurs when trying to generate the map using spearman and not pearson? Here is the code I am using: proc template; define statgraph corrHeatmap; dynamic _Title; begingraph; entrytitle _Title; rangeattrmap name='map'; range -1 - 1 / rangecolormodel=(cxfc8d59 cxffffbf cx91bfdb); endrangeattrmap; rangeattrvar var=r attrvar=r attrmap='map'; layout overlay / xaxisopts=(display=(line ticks tickvalues)) yaxisopts=(display=(line ticks tickvalues)); heatmapparm x = x y = y colorresponse = r / xbinaxis=false ybinaxis=false colormodel=THREECOLORRAMP name = "heatmap" display=all; continuouslegend "heatmap" / orient = vertical location = outside title="Spearman Correlation"; endlayout; endgraph; end; run; %macro prepCorrData(in=,out=); proc corr data=&in. spearman nocorr outs=work._tmpCorr ; run; data &out.; keep x y r; set work._tmpCorr(where=(_TYPE_="CORR")); array v{*} _numeric_; x = _NAME_; do i = dim(v) to 1 by -1; y = vname(v(i)); r = v(i); /* creates a diagonally sparse matrix */ if (i<_n_) then r=.; output; end; run; proc datasets lib=work nolist nowarn; delete _tmpcorr; quit; %mend; %prepCorrData( in=work.one, out=one_heat); proc sgrender data=one_heat template=corrheatmap; dynamic _title="Correlation Matrix at 12 Months"; run; Thank you!
... View more