Hi I am sorry to bother you I am using STATA S/E 18 and trying to do a heatplot I have several variables of interest
auc_cpeptidebaseline auc_cpeptide12mon final0child final12child final24child final36child final48child
I have got the graph how I like it
using the following code
pwcorr auc_cpeptidebaseline auc_cpeptide12mon final0child final12child final24child final36child final48child , sig
matrix C = r(C)
matrix sig = r(sig)
heatplot C, values (label(sig)) lower nodraw generate
// significance stars
gen str sig = cond(_Mlab<.001, "***", cond(_Mlab<.01, "**", cond(_Mlab<.05, "*", "")))
heatplot C, color(hcl diverging, intensity(.6)) lower aspectratio(1) ///
addplot(scatter _Y _X if _Y!=_X, msym(i) mlab(_Z) mlabf(%9.2f) mlabpos(0) mlabc(black) ///
|| scatter _Y _X if _Y==_X, msym(i) mlab(_Z) mlabf(%9.0f) mlabpos(0) mlabc(black) ///
|| scatter _Y _X if _Y!=_X, msym(i) mlab(sig) mlabpos(6) mlabgap(2) mlabc(black))
However I only want the graph to show how auc_cpeptidebaseline and auc_cpeptide12mon relate to the others I am not interested in how final24child and final36child relate etc is there anyway to do this. I can edit graph tp make axis look niceI only want it to show first 2 columns essentially
All help gratefully received
auc_cpeptidebaseline auc_cpeptide12mon final0child final12child final24child final36child final48child
I have got the graph how I like it
using the following code
pwcorr auc_cpeptidebaseline auc_cpeptide12mon final0child final12child final24child final36child final48child , sig
matrix C = r(C)
matrix sig = r(sig)
heatplot C, values (label(sig)) lower nodraw generate
// significance stars
gen str sig = cond(_Mlab<.001, "***", cond(_Mlab<.01, "**", cond(_Mlab<.05, "*", "")))
heatplot C, color(hcl diverging, intensity(.6)) lower aspectratio(1) ///
addplot(scatter _Y _X if _Y!=_X, msym(i) mlab(_Z) mlabf(%9.2f) mlabpos(0) mlabc(black) ///
|| scatter _Y _X if _Y==_X, msym(i) mlab(_Z) mlabf(%9.0f) mlabpos(0) mlabc(black) ///
|| scatter _Y _X if _Y!=_X, msym(i) mlab(sig) mlabpos(6) mlabgap(2) mlabc(black))
However I only want the graph to show how auc_cpeptidebaseline and auc_cpeptide12mon relate to the others I am not interested in how final24child and final36child relate etc is there anyway to do this. I can edit graph tp make axis look niceI only want it to show first 2 columns essentially
All help gratefully received
Comment