As I recently posted here, I'm trying to create Table 1 for a research journal article. @Reeza pointed me to the Table 1 macro "TableN" and it looks like exactly what I need.
I downloaded the macro and ran it, and then I tried to call it based on the example provided.
/*Example macro call*/
/*%tablen(data=example, by=arm,
var=age date_on sex race1 smoke_st num_met,
type=1 3 2, outdoc=~/ibm/example1.rtf);*/
/*My version*/
%tablen(data=have, by=TM_group,
var=DEM_AGE DEM_SEX,
type=2 2, outdoc="C:\data_output\test.rtf);
But I got an error after "by TM_group": ERROR: All positional parameters must precede keyword parameters. I looked up the error and it has something to do with the commas between the parameters. After some trial and error of deleting commas, I got it to run without error, but it doesn't produce any output.
Sample data is provided below:
data have;
infile datalines dsd dlm=',' truncover;
input DEM_AGE DEM_SEX cohort_flag TM_group;
datalines;
3,1,1,0
2,1,1,1
3,2,1,1
3,2,1,1
3,2,1,0
2,2,1,1
2,1,1,1
3,1,1,1
2,1,1,1
3,2,1,0
2,1,1,0
2,2,1,1
3,2,1,0
2,2,0,
3,2,1,1
3,2,1,1
3,1,1,0
3,2,1,0
2,1,1,0
3,1,1,1
3,2,1,1
3,2,1,0
3,2,1,1
3,2,1,1
3,2,1,1
; RUN;
proc format library=temp;
value age2grp
1='1:Age Group <65'
2='2:Age Group [65,75)'
3='3:Age Group >=75'
.='Inapplicable/Missing';
value sex
.='Inapplicable/Missing'
1='1:Male'
2='2:Female'
value yesfmt
1='1:Yes'
2='2:No'
.='Inapplicable/Missing'
;
RUN;
... View more
Does anyone know how to calculate odds ratio in its original scale from the coefficient and/or odds ratio from a logistic regression model which includes a natural log transformed independent variable? For example, logit (p/(1-p)) = b0+ b1 In (x) If b1=0.1, (b1 is the coefficient of natural log transformed independent variable) What is the OR for one unit increase in the natural log of x? What is the OR for one unit increase in original scale of X? What is the OR for 5-unit increase in natural log of x? What is the OR for 5-unit increase in X?
... View more
Anyone can help with following question? Thanks. In the logistic regression model, b1 is the coefficient of natural log transformed variable x, it is not the coefficient of original scale of x. logit (p/(1-p)) = b0+ b1 In (x) If b1=0.1, What is the OR for one unit increase in the natural log of x (e^0.1)? What is the OR for one unit increase in original scale of X? What is the OR for 5-unit increase in natural log of x ( ? What is the OR for 5-unit increase in X?
... View more
Is it possible to use SAS for annotating the CRF(case report form in Clinical Trials) ? If so, please assist on how to do it? Looking forward to your response. Thanks In advance
... View more