LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 23 Apr 2007 18:36:52 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: Putting a numeric value into a macro variable
Comments: To: akramer@CERNER.COM
In-Reply-To:  <200704231748.l3NFCOMu023847@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed

Andrew ,

Ill let the Stats guys clue you in on correct way to do what you want in Proc Survey Select. From a Macro stand point putting everything else aside, switch the SymputN to SymputX as SymputN can only be used in SCL code.

Toby Dunn

You can see a lot by just looking. ~Yogi Berra

Do not seek to follow in the footsteps of the wise. Seek what they sought. ~Matsuo Basho

You never know what is enough, until you know what is more than enough. ~William Blake, Proverbs of Hell

From: Andrew Kramer <akramer@CERNER.COM> Reply-To: Andrew Kramer <akramer@CERNER.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Putting a numeric value into a macro variable Date: Mon, 23 Apr 2007 13:48:32 -0400

I'm trying to do some repeated sampling of a data set within a macro. Here are the statements that I'm using:

/************************************************************************** *********/ /********** MACRO SIMOBS **************/ /********** Selects Random Stratified Sampling **************/ /********** grp = Primary Group, grppct = Primary Group % **************/ /************************************************************************** *********/

%MACRO SIMOBS(sn);

%do j = 1 %to 8001 %by 2000; call symputn('sampmajor', (&j - 1); call symputn('samprest', (10000 - &sampmajor);

proc surveyselect data = mpm2 method = urs out = mpm_&sn.&j outhits outsize rep = 20 sampsize = (&sampmajor, &samprest) seed = 51; strata ptgrp&grp; run; %end;

%MEND;

What I would like to do is to run Proc Surveyselect using a total sample size of 10000 but with breakdowns in my strata of (0, 10000), (2000, 8000), (4000, 6000), (6000, 4000) and (8000, 2000).

Thanks! Andrew

_________________________________________________________________ Get a FREE Web site, company branded e-mail and more from Microsoft Office Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/


Back to: Top of message | Previous page | Main SAS-L page