BookmarkSubscribeRSS Feed
LRamsey
Calcite | Level 5

Hello, 

I am working with a data set called PRAMS and it uses a complex sampling design. It has several racial categories and years. I would like to include one year of data and two racial categories (non-Hispanic). However, from reading it says I cannot delete cases because it will mess up the weighting. How can I exclude cases for the purposes of my analysis? Also, how can I identify non hispanic black and non hispanic white if there are two separate variables. I have a MAT_RACE variable with categories 1, 2,3 (white black other that include non hispanic and hispanic ethnicity) I also have Hispanic BC that includes 1 yes hispanic and 2 not hispanic. What code can I use to create a variable for non hispanic black white and other ( I would like to use this as my analytic sample). 

 

Finally, I have non PRAMS data that I have merged with PRAMS data. I was wondering if I had to create weights for that data as well? My dependent variables (outcomes) come from PRAMS and my independent variables come from another data set that I created and merged with PRAMS data. I am doing a state level analysis..so the outcomes are nested within states. I know that will be a multilevel model. To run the statistical models I have to apply weights to the PRAMS data. Should I also create weights for the other (independent variables) as well?

6 REPLIES 6
ballardw
Super User

Using a single year is not likely to be an issue as long as you are careful to use the entire year and if the data were originally weighted for that year. A multiyear data set may have been weighted differently, so read and understand the weighting methodology for the set used. If you extract a single year from a multiyear it is extremely likely that any statistic that you project to population total (not rates) is way low.

 

You don't mention what type of analysis you are wanting. If you want to have the data grouped by values of a category for you may be looking for a DOMAIN statement.

 

Code to create non-hispanic white and non-hispanic (and should do non-hispanic other) depends to an extent on what you want for a result. Do you want 3 levels, 4 levels, 5 ....

/* create hispanic as separate level with non-hispanic others*/

if hispanic then newvar=1 ; /* or what ever code*/
else select (race);
    when (white) newvar=2;
    when (black) newvar=3;
    when (other) newvar=4;
    other;
end;

use your variables and values.

 

What sort of data did you merge to data set? If you affected the number of records then some sort of reweighting is more likely to be needed and you may have moved your project into the MIXED model world.

 

LRamsey
Calcite | Level 5
Hello,
Thank you for this. I am trying to merge state level criminal justice data
with the PRAMS data set. I only selected one year of data ( I was advised
by my committee). I have black/white ratios for example of incarceration
data (at the state level). I merged the data with PRAMS, so it was an
addition of variables but not cases. So each woman in the data set will be
assigned the b/w ratio of incarceration based on the state she lives in.
One state did not provide the appropriate information, but I'm thinking I
can exclude it from the analysis ( it has only white vs non white and that
is not helpful for my research question). Is that correct? Can I exclude
that state?
I am new to multilevel modeling. I was told that I did not have to do it.
But I think I do, since I have individuals within states and I have 33
states. I am planning to categorize my b/w ratios of incarceration into low
med and high and my outcome variables (From PRAMS with the weights) are
dichotomous (yes and no). So it would be a form of logistic regression.
This is the PRAMS weighting process:
https://www.cdc.gov/prams/methodology.htm#n4

Thank you!
ballardw
Super User

That description really sounds like some sort of Mixed model which is not my strong suit.

 

I would look strongly at your incarceration data. You may want to exclude some other states because the black population is low and the one-year rate can fluctuate drastically. I say that as I live and work in such a state and get funny looks at some meetings where I mentioned that we have more Basques, Native Americans and, at that time, Asians than Blacks. So ratios of anything related to the black population were subject to wide annual variation. This might also be the reason one of your states does "other than white" to have a sample reliable enough to mean something in terms of policy planning/decision making processes.

LRamsey
Calcite | Level 5
Yes! Thank you! I have considered this as well!! I've been told so many
different things, but it makes sense. Some of the ratios are huge and
that's because there's a small black population. So I think I will exclude
them. However, I've been told that I can't delete because that will mess up
the weighting. So, how could I handle that in SAS? Could I set the
incarceration variable for those states to zero and they would fall out of
my regression models?
Yes after reading, I realized it would be a mixed model. I've been told to
run both fixed and random models and compare them. However, I am not sure.
I am new to this type of analysis.

Thank you!!
ballardw
Super User

If a variable is missing on a model statement in most of the procedures the record would be excluded from the analysis, which may not quite be the same as discarding the record such as with Where.

 

But not sure how to handle this case, as I said mixed models aren't my experience.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 2082 views
  • 1 like
  • 2 in conversation