Sorry to bother you again. I put the syntaxwith outcome=EXPOSURE instead or IR=EXPOSURE to the left of =, But i think i have the 'offset=log(PersonYrs'' bit wrong as I get an error. Please can you help, I have created PersonYrs so this variable exists in the IRsforCohort dataset. thanks. proc genmod data=IRsforCohort; class EXPOSURE &covariates ; model outcome=EXPOSURE &covariates Age_At_Index IndexYear / dist = poisson offset=log(PersonYrs) link=log type3; Estimate ' 1 Vs 0' EXPOSURE 1 -1 ; ods output Estimates=RR&infile._adj; title1 "Proc GENMOD for Adjusted &infile &time"; run; ERROR: Variable LOG not found. ERROR 22-322: Syntax error, expecting one of the following: ;, A, AGGREGATE, ALPH, ALPHA, CICONV, CL, CLCONV, CODING, CONVERGE, CONVH, CORRB, COVB, D, DIAGNOSTICS, DIST, DSCALE, ERR, ERROR, EXPECTED, ID, INFLUENCE, INITIAL, INTERCEPT, ITPRINT, LINK, LOGNB, LRCI, LRCL, MAXIT, MAXITER, NOINT, NOLOGNB, NOPRINTCL, NOSCALE, OBSTAT, OBSTATS, OFFSET, P, PRED, PREDICTED, PSCALE, R, RESIDUAL, RORDER, SCALE, SCORING, SINGULAR, TYPE1, TYPE3, TYPE3WALD, WALD, WALDCI, WALDCL, XVARS.
... View more