Programming the statistical procedures from SAS

surveylogistic, domain statement, subpop analysis troubles

Reply
New Contributor
Posts: 4

surveylogistic, domain statement, subpop analysis troubles

Hello,

I am trying to do logistic regressions with a large data set from a stratified sample with weighting. The survey included adults and child respondents, and also recorded race/ethnicity data.  I want to only look at adults, and I do not want to include respondents of two specific race/ethnicity (API and Foreign-born black). In the case of this data set there is a variable for child or not (0=child, 1=adult) and for race (7=API and 8=foreign-born black). Due to the stratification/weighting I can't just create a data set that excludes children and members of those two racial groups, so its my understanding that the thing to do is create an indicator variable "domain" and then use the domain statement in proc surveylogistic.

HOWEVER! When I do that, the output I'm getting still includes analysis including races 7 and 8! It still calculates odds ratios for race=7 and 8. But when I do a proc print or something like that for my data set, it seems my indicator variable is correct-where all child respondents and API/foreign-born black folks have domain=0.

So I can't figure out what's wrong. Does anyone have any tips? Below is included my code and a piece of the output that demonstrates the issue. Thanks in advance!

in the code below, s_child_w2 is the child/adult variable. nq8p_w2 is a response variable. In the output below that you can see it still includes analysis for 7 and 8, even though there shouldn't be any 7's and 8's in my domain!

What am I doing wrong?

data logistics;

     set libref.dataset;

     keep s_child_w2 nq8p_w2  Race AgeGroup HealthStatus MaritalStatus EmploymentStatus DisabilityStatus Domain Strata_w2 personwgt_w2RuralorUrban;

Length AgeGroup $ 25 HealthStatus $ 25 RuralorUrban $ 25 Race $ 25 Domain 8;

if s_child_w2 = 0 then domain = 0;

     else if onerace2_w2 = 7 then domain = 0;

     else if onerace2_w2 = 8 then domain = 0;

       else domain = 1;

run;

proc surveylogistic data=discrim.logistics;

class onerace2_w2 (REF='4')/PARAM=Reference;

domain domain;

model nq8p_w2 (Event='1') = onerace2_w2;

run;

Domain Analysis for domain Domain=1

Domain Summary

Number of Observations 4626

Number of Observations in Domain 2335

Number of Observations not in Domain 2291

Variance Estimation

Method Taylor Series

Variance Adjustment Degrees of Freedom (DF)

Number of Observations Read 4626

Number of Observations Used 4547

Probability modeled is nq8p_w2=1.

Note: 79 observations were deleted due to missing values for the response or explanatory variables.

Class Level Information

Class Value Design Variables

onerace2_w2 1 1 0 0 0 0 0 0

  2 0 1 0 0 0 0 0

  3 0 0 1 0 0 0 0

  4 0 0 0 0 0 0 0

  5 0 0 0 1 0 0 0

  6 0 0 0 0 1 0 0

  7 0 0 0 0 0 1 0

  8 0 0 0 0 0 0 1

Model Convergence Status

Convergence criterion (GCONV=1E-8) satisfied.

Testing Global Null Hypothesis: BETA=0

Test Chi-Square DF Pr > ChiSq

Likelihood Ratio 254.9542 7 <.0001

Score 245.0629 7 <.0001

Wald 228.6921 7 <.0001

Analysis of Maximum Likelihood Estimates

Parameter   DF Estimate Standard

Error Wald

Chi-Square Pr > ChiSq

Intercept   1 -0.8071 0.1118 52.1584 <.0001

onerace2_w2 1 1 0.4916 0.1477 11.0831 0.0009

onerace2_w2 2 1 1.9991 0.1512 174.8703 <.0001

onerace2_w2 3 1 0.6537 0.1509 18.7678 <.0001

onerace2_w2 5 1 0.6001 0.1751 11.7482 0.0006

onerace2_w2 6 1 0.2832 0.1599 3.1383 0.0765

onerace2_w2 7 1 0.9097 0.2530 12.9325 0.0003

onerace2_w2 8 1 1.2126 0.2112 32.9687 <.0001

Odds Ratio Estimates

Effect Point Estimate 95% Wald

Confidence Limits

onerace2_w2 1 vs 4 1.635 1.224 2.184

onerace2_w2 2 vs 4 7.382 5.489 9.928

onerace2_w2 3 vs 4 1.923 1.430 2.584

onerace2_w2 5 vs 4 1.822 1.293 2.568

onerace2_w2 6 vs 4 1.327 0.970 1.816

onerace2_w2 7 vs 4 2.484 1.513 4.078

onerace2_w2 8 vs 4 3.362 2.223 5.086

Ask a Question
Discussion stats
  • 0 replies
  • 205 views
  • 0 likes
  • 1 in conversation