BookmarkSubscribeRSS Feed
carolet
Calcite | Level 5

DOes anyone know how to program the following SPSS code in SAS? I need to do exactly this but in SAS! I do have access to SPSS at all!

 

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<SPSSComplexSamples version="1.0">

                <Header copyright="Copyright (c) SPSS Inc., 2006. All Rights Reserved."/>

                <AnalysisDesign SRSestimator="wor" numberOfStages="2">

                                <AnalysisStage estimationMethod="equal_wor" label="Stage 1" stageNumber="1">

                                                <StrataVarList numberOfVariables="3">

                                                                <Variable name="region_num"/>

                                                                <Variable name="sub_region_num"/>

                                                                <Variable name="comm_size_num"/>

                                                </StrataVarList>

                                                <ClusterVarList numberOfVariables="1">

                                                                <Variable name="residence_merge"/>

                                                </ClusterVarList>

                                                <IncProb>

                                                                <Variable name="inc_prob_1"/>

                                                </IncProb>

                                </AnalysisStage>

                                <AnalysisStage estimationMethod="equal_wor" label="Stage 2" stageNumber="2">

                                                <StrataVarList numberOfVariables="1">

                                                                <Variable name="age_gender_group"/>

                                                </StrataVarList>

                                                <IncProb>

                                                                <Variable name="inc_prob_2"/>

                                                </IncProb>

                                </AnalysisStage>

                                <Weight>

                                                <Variable name="weight_final"/>

                                </Weight>

                </AnalysisDesign>

</SPSSComplexSamples>

2 REPLIES 2
ballardw
Super User

 I would expect something sampling to indicate the number of records to select or a rate to select records from a base data set. Unless that is the use for the variables inc_prob_1 and inc_prob_2. In which case these would likely be the equivalents of _nsize_ variable in a SAMPSIZE=dataset for use in Surveyselect or _rate_ in a SAMPRATE= dataset.

 

Proc surveyselect would be the procedure, with a Strata statment having the stratlist variables and a cluster cluster statement with the cluster variable. Assuming I am rgith about your inc_prob_1 then your samprate data set would have to be sorted in terms of the strata combinations.

 

Since I have no idea what the output of the SPSS looks like I can't suggest any other specific options.

 

 

Reeza
Super User
You're likely going to get better help if you reframe the question to ask what you need from SAS with sampling methodology, ie how do I create a simple random sample, stratified by Age/Gender Group (combined??) weighted by a variable, clustered on Residence, with 3 stratas or something along those lines.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 753 views
  • 6 likes
  • 3 in conversation