I'm having trouble associating formats with a permanent SAS dataset. I am sure that I did create the format file. But when I run the attached SAS code, and then run PROC FREQ, the output is not formatted. The attached output.docx presents Race output as, e.g., 1, 2, 3 ... rather than the formatted "White", "African American", etc. What am I doing wrong? Thanks, Dennis Hanseman
... View more
In PROC LOGISTIC (v.9.4) with SELECTION=STEPWISE, if you ask to output the ROC curve data (OUTROC), you get results for every step. My question: Is there a way to restrict the output to just the final step? Failing that, is there a way that I can use ODS to output the total number of steps so that I can subset the OUTROC dataset? [I suppose I could use proc freq to find the maximum number of steps and then try to pass that maximum number to a DATA step. But that's very kludgy.] My current code: proc logistic data=hem; model outcome(ref='Alive') = IL_1ra IL_6 IL_8 IL_10 Eotaxin IP_10 MCP_1 / outroc=hem selection=stepwise; output out=outhem predicted=predhem xbeta=xbhem; run; Thanks, Dennis Hanseman
... View more
I'm doing 1:1 greedy matching using PSMATCH using the following code: proc psmatch data=one region=allobs; class grouped sex ClinStageGrp CDCC_TOTAL_BEST FACILITY_TYPE_CD race1 insurance_status location; psmodel grouped(treated='Neoadjuvant chemo') = sex ClinStageGrp CDCC_TOTAL_BEST FACILITY_TYPE_CD race1 insurance_status location; match method=greedy(k=1) exact=(sex race1); assess ps var=(sex) / varinfo plots=(boxplot barchart) weight=none; output out(obs=match)=OutOne matchid=matchid; run; I thought I was successful because the following summary indicated that all of my controls were matched. Matching InformationDifference StatisticMethodControl/Treated RatioOrderCaliper (Logit PS)Matched SetsMatched Obs (Treated)Matched Obs (Control)Total Absolute Difference Logit of Propensity Score Greedy Matching 1 Descending 0.233292 1678 1678 1678 12.99654 However, the following warning appears in the Log: WARNING: Some treated units have less than the specified K=1 matched controls because there are not enough available controls for these treated units. Now this is really puzzling because my output data set contains 2 x 1678 = 3356 records. In other words, twice the number of controls which indicates, to me, 1:1 matching. What's happening here? Thanks.
... View more
I'm having problems with the following GENMOD code: proc genmod descending data=dat1; where DV ne .; class subjectid timepoint / param=glm; model vitalstatus = DV timepoint DV*timepoint / d=b type3 maxiter=100; repeated subject=subjectid / type=cs corrw ; estimate 'at time 0' intercept 0 &v 1 timepoint 0 0 0 0 0 0 0 0 &v*timepoint 1 0 0 0 0 0 0 0 / exp; ... estimate 'at time 72' intercept 0 &v 1 timepoint 0 0 0 0 0 0 0 0 &v*timepoint 0 0 0 0 0 0 0 1 / exp;run; My continuous dependent variable is measured at 8 time points per subject, and is highly correlated across time. The Pearson coefficients for timepoint pairs are all in the range 0.6-0.8. Even with a type = cs correlation structure, I cannot get this to work. If I ignore the repeated measure aspects, this works just fine. But what's the problem with even a simple CS structure? Anyone have ideas?
... View more
Without going into too much detail, I want to say that I've encountered what seems to be a problem with HPSPLIT. I first ran this procedure using a dataset that was divided (using variable "divide") into a training subsample (divide = 1) and a validation subsample (divide = 0). I included the statement: partition rolevar=divide(TRAIN='1' VALIDATE='0'); which is supposed to tell SAS to using the training data to estimate a classification tree and the validation data to validate it. To check the results I got, I created a new dataset. I made a new data set containing only the training data. I did this by using if divide = 1; to subsample the original large data. When I ran HPSPLIT on just the training data alone (and without the "partition" statement), I got a different tree. Why should the absence of the validation data in my second run of HPSPLIT affect the results? It does not seem right. I expected to get the same tree both ways. Thanks. Dennis H.
... View more