SAS, ROC curve, PROC LOGISITC, point labels - sas

I am trying to create a single ROC curve for three bio-markers on a common population.
I have already created an overlay curve from proc logistic statement. is there any way in SAS (among default options) to label the specific points on one of the bio-markers.
also, I would like to create a horizontal and vertical lines that depict the Sn and 1-Sp for those specific points.
is there an easier way to do this other than creating a annotation dataset and plotting a graph through proc gplot?
Thanks in advance!!

Among default options, the answer is no. SAS gives you options to control certain aspects of the ROC curves in the roc and rocoptions options in the proc logistic statement, but it doesn't support adding specific features to plots directly within the procedure.
To get the features you're looking for, as you said, you'll need to plot the raw ROC data using a graphics procedure. I like sgplot, the ODS graphics successor to gplot. Assuming you know exactly which points you want to label ahead of time, horizontal and vertical lines for the sensitivity and 1 - specificity can be generated using the refline statement in sgplot.
An annotation dataset may be the best way to go to label specific points. If you're using sgplot, you can generate an SG annotation dataset using the SG annotation macros. More information regarding SG annotation, including the use of the macros, can be found here. The macros are located in the default SAS autocall macro library so they should be able to be referenced without any special fussing. Once you have your dataset, you can feed it into sgplot using the sganno= option in the proc sgplot statement.

Related

How do I construct a 3D bivariate normal density surface in SAS?

So I've managed to define a grid over the definition region (arbitrary for now) of the density function in PROC IML. But, being a newbie in SAS, I have no clue on how to draw the surface. The problem isn't so much the syntax as it's coming up with an idea that doesn't transcend the functionality that SAS is able to achieve, which, based off of the info. I have gathered so far, seems limited.

how to plot Y*X with a specified x-axis in SAS

I'm trying to use proc gplot to create a plot of my y-variable against response, but have a specific covariate(z) on the x-axis. Is there a way to do this in gplot? Ive tried yxz, yx yz, and a bunch of other similar things but can't figure it out.
Thanks!
It sounds like a basic plot to me, I prefer PROC SGPLOT because its the easiest/clearest way to specify the X/Y. Assuming it's a scatter use SCATTER, if you want a line, use SERIES.
proc sgplot data=MY_DATA;
SCATTER X=TIME Y=PREDICTED_VAR;
RUN;

How do I remove the leftmost zero (on the x-axis) when graphing a categorical variable?

hist body, discrete freq xlabel(#5, labsize(small) angle(forty_five) valuelabel) produces:
I'm graphing a categorical variable, but I can't figure out how to drop the zero from the x-axis. I've tried the documentation for xlabel() and xscale() but didn't find any winners.
The short answer is to spell out that you only want xla(1/5, stuff ). How to spell out precisely which labels you want is documented.
Not the question, but this is in my view a poor graph. Go with a horizontal bar chart in which (1) the discreteness of the variable is respected;(2) the category labels are properly and readably horizontal, instead of using a most awkward device of text at 45 degrees. catplot (SSC) is one way to go. Also in Stata 13 (updated) upwards, graph hbar will do as well. You should also split the title in two lines. Even further off-topic: most consumers of this research should not care two hoots about the variable name or its question number in your survey.

SAS ods output: axis labels too condensed

I am trying to output some plots (of cumulative incidence functions made by using proc gplot) with SAS 9.2 but somehow the letters of the axis labels keep to stay condensed, sort of covering each other. I would attach a picture with the problem but I do not have enough reputations to do so...
I have tried to reset all the options by executing:
goptions reset=all;
but it did not help much. If I set ftext to a different font type, the error(?) does not disappear. I would like to make .rtf outputs. Do you have any idea what the problem might be?
Check your graphics device options. Changing to device=PNG or device=JPG may help resolve this issue.

How can I get Google Charts to display multiple colors in a scatter chart?

I would like to display multiple colors (and potentially shapes and sizes) of data points in a Google Chart scatter chart. Does anyone have an example of how to do so?
I answered my own question after waiting SECONDS for an answer here :-)
You can indeed have different colors for different data elements. For example:
http://chart.apis.google.com/chart?chs=300x200&cht=s&chd=t:1,2,3|6,5,4&chds=1,3,0,10&chxt=x,y&chxl=0:|0|1|2|1:|0|10&chm=d,ff0000,0,0,8,0|a,ff8080,0,1,42,0|c,ffff00,0,2,16,0
It's the chm= that does the magic. I was trying to have multiple chm= statements. You need to have just one, but with multiple descriptions separated by vertical bars.
You can only use one dataset in a scatter plot, thus only one color.
http://code.google.com/apis/chart/#scatter_plot
From the API description:
Scatter plots use multiple data sets differently than other chart types. You can only show one data set in a scatter plot.
You could effectively fake a multi-color scatter plot by using a line plot with white lines and colored shape markers at the points you want to display.
Here's another example: twitter charts. I'm hoping to do the same thing. Need to find out how to do the concentric circles.