I tried a new model with two terms in it. Please see my code, log, and output for each approach. Code –
proc genmod data = data descending;
class var_a(ref='0') var_b(ref='0')/param=ref;
model outcome(ref='0') = var_a var_b/ dist = binomial link = log type3;
estimate 'Beta' var_a 1 -1/ exp;
estimate 'Beta' var_b 1 -1/exp;
run;
Log –
NOTE: PROC GENMOD is modeling the probability that outcome='1'.
NOTE: The Pearson chi-square and deviance are not computed since the AGGREGATE option is not
specified.
NOTE: Algorithm converged.
NOTE: The scale parameter was held fixed.
WARNING: More coefficients than levels specified for effect var_a. Some coefficients will be
ignored.
WARNING: More coefficients than levels specified for effect var_b. Some coefficients will be
ignored.
NOTE: PROCEDURE GENMOD used (Total process time):
real time 1.15 seconds
cpu time 0.78 seconds output - using nlmeans approach proc logistic data=data;
class var_a(ref="0") var_b(ref="0")/ param=glm;
model outcome(event="1")=var_a var_b;
lsmeans var_a/ e ilink;
lsmeans var_b/ e ilink;
ods output coef=coeffs;
store out=ques;
run;
%NLMeans(instore=ques, coef=coeffs, link=logit, options=ratio, title=Relative Risk);
Log –
NOTE: PROC LOGISTIC is modeling the probability that outcome='1'.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: The LOGISTIC procedure generated the model item store WORK.QUES.
NOTE: The data set WORK.COEFFS has 10 observations and 6 variables.
NOTE: There were 341 observations read from the data set WORK.DATA.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 2.42 seconds
cpu time 1.62 seconds
2633
2634 %NLMeans(instore=ques, coef=coeffs, link=logit, options=ratio, title=Relative Risk);
WARNING: The final Hessian matrix is not positive definite, and therefore the estimated covariance
matrix is not full rank and may be unreliable. The variance of some parameter estimates
is zero or some parameters are linearly related to other parameters.
WARNING: The final Hessian matrix is not positive definite, and therefore the estimated covariance
matrix is not full rank and may be unreliable. The variance of some parameter estimates
is zero or some parameters are linearly related to other parameters.
NOTE: The NLMEANS macro used 3.73 seconds. output - I am supposed to write separate LSMEANS statement and one macro statement, right? What am I doing wrong here?
... View more