| Model Convergence Status |
|---|
| Convergence criterion (GCONV=1E-8) satisfied. |
I have survey data and I want to do a bivariate logistic regression of age categories (18-29, 30-39, 40-49, 50+) on PrEP usage (yes, no). Here is my code below
proc surveylogistic data=dataname;
class AgeCat;
model takePrEP= AgeCat;
run;
I want to report the p-value, odds ratios, and confidence intervals for the AgeCat variable. Here is my output for this code. My questions are: what p-value would I report? Am I missing something in my code?
| Model Convergence Status |
|---|
| Convergence criterion (GCONV=1E-8) satisfied. |
| Model Fit Statistics | ||
|---|---|---|
| Criterion | Intercept Only | Intercept and Covariates |
| AIC | 147.059 | 150.391 |
| SC | 150.252 | 163.163 |
| -2 Log L | 145.059 | 142.391 |
| Testing Global Null Hypothesis: BETA=0 | ||||
|---|---|---|---|---|
| Test | F Value | Num DF | Den DF | Pr > F |
| Likelihood Ratio | 0.89 | 3 | 177 | 0.4479 |
| Score | 0.85 | 3 | 177 | 0.4666 |
| Wald | 0.86 | 3 | 177 | 0.4646 |
| Type 3 Analysis of Effects | ||||
|---|---|---|---|---|
| Effect | F Value | Num DF | Den DF | Pr > F |
| AgeCat | 0.86 | 3 | 177 | 0.4646 |
| Analysis of Maximum Likelihood Estimates | |||||
|---|---|---|---|---|---|
| Parameter | Estimate | Standard Error |
t Value | Pr > |t| | |
| NOTE: The degrees of freedom for the t tests is 179. | |||||
| Intercept | 1.6129 | 0.2857 | 5.65 | <.0001 | |
| AgeCat | 1 | 0.5619 | 0.3722 | 1.51 | 0.1329 |
| AgeCat | 2 | -0.0442 | 0.3787 | -0.12 | 0.9071 |
| AgeCat | 3 | -0.4089 | 0.5506 | -0.74 | 0.4587 |
| Odds Ratio Estimates | |||
|---|---|---|---|
| Effect | Point Estimate | 95% Confidence Limits | |
| NOTE: The degrees of freedom in computing the confidence limits is 179. | |||
| AgeCat 1 vs 4 | 1.956 | 0.359 | 10.664 |
| AgeCat 2 vs 4 | 1.067 | 0.193 | 5.882 |
| AgeCat 3 vs 4 | 0.741 | 0.096 | 5.694 |
| Association of Predicted Probabilities and Observed Responses | |||
|---|---|---|---|
| Percent Concordant | 41.0 | Somers' D | 0.182 |
| Percent Discordant | 22.7 | Gamma | 0.287 |
| Percent Tied | 36.3 | Tau-a | 0.044 |
| Pairs | 3875 | c | 0.591 |
@westbestern wrote:
I have survey data and I want to do a bivariate logistic regression of age categories (18-29, 30-39, 40-49, 50+) on PrEP usage (yes, no). Here is my code below
proc surveylogistic data=dataname; class AgeCat; model takePrEP= AgeCat; run;I want to report the p-value, odds ratios, and confidence intervals for the AgeCat variable.
The p-value is 0.4646 in this line
| AgeCat | 0.86 | 3 | 177 | 0.4646 |
|---|
There is no odds ratio for AgeCat; there are odds ratio for the different levels of AgeCat vs level 4 of AgeCat.
You want confidence intervals for what statistic regarding the AgeCat variable? You need to specify.
Those are given here:
Odds Ratio Estimates Effect Point Estimate 95% Confidence Limits NOTE: The degrees of freedom in computing the confidence limits is 179. AgeCat 1 vs 4 1.956 0.359 10.664 AgeCat 2 vs 4 1.067 0.193 5.882 AgeCat 3 vs 4 0.741 0.096 5.694
Every category is "compared" to the reference category, so that makes 3 comparisons (3 odds ratio's).
And you have also 3 parameter estimates indeed.
The way to interpret them depends on the coding-scheme that was used for your age categories: effect coding or pure dummy coding or ...
Koen
No, I think the last category is the reference category (by default).
Use REF=FIRST if you want the 1st category to be the reference category instead.
From the doc (you can make any category the reference category) :
specifies the reference level for PARAM=EFFECT or PARAM=REFERENCE. For an individual (but not a global) variable REF= option, you can specify the level of the variable to use as the reference level. For a global or individual variable REF= option, you can use one of the following keywords. The default is REF=LAST.
designates the first-ordered level as reference
designates the last-ordered level as reference
Koen
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.