1:4 matching for Proc SurveySelect

  • Permalink
  • submit to reddit
  • Email
  • Follow


Below reference is the following paper: Simplified Matched Case-Control
Sampling PROC SURVEYSELECT
(http://www2.sas.com/proceedings/sugi29/209-29.pdf)

Now, I want to create a matched dataset just as they do in this paper
based on a number of matching criteria but I want the match to be 1
case to 4 controls rather than the 1 to 1 match that they did in this
paper.  I assume this is fairly easy to do but I am not sure where to
start.

Thanks in advance,

Alex

0
Reply apavluck (128) 10/19/2005 8:08:03 PM

See related articles to this posting

comp.soft-sys.sas 131318 articles. 29 followers. Post

0 Replies
91 Views

Similar Articles

[PageSpeed] 52


Reply:

Similar Artilces:

Re: Proc Match, Proc Print, WHERE, and data cleaning #4 626591
Dear Howard. Thanks for your comments in the thread:=20 Re: TRANSPOSE and Analysis of the Distribution =20 - you are certainly correct! <?xml:namespace prefix =3D o ns =3D = "urn:schemas-microsoft-com:office:office" /> And Dear Charles - thanks for your patience! You asked me to write = something about my experiences with SAS's PROC MATCH back on October 22, = 2003, but I got waylaid from my repeat address analysis and have just = recently gotten back into the whole thing. So please pardon the wait. = =20 This discussion also speaks directly to your comments, H...

Re: Proc Match, Proc Print, WHERE, and data cleaning #4 1540541
Dave: Does your address include the name of an entity? Different persons often have the same address. Sometimes companies do as well. Clustering on address alone can lead one astray. If you have the addresses in different rows of a dataset, the SAS SPEDIS() function does a decent job of producing a similarity score. A list of addresses with similarity scores between two extremes and sorted by the score generally isolates similar but not identical strings. A list of this type gives you a spectrum of degrees of similarity (hence the term 'fuzzy matching'). Search the SAS-L archives or s...

proc surveyselect #4
I want to know how I use the size command in the proc surveyselect.<BR>when I use the method=pps the size command ger red and not blue.Why is it happening? ...

Re: Proc SURVEYSELECT #4
Zach, I believe you need to specify METHOD=URS (not SRS) on your PROC statement to specify unrestricted random sampling, which is with replacement. SRS (simple random sampling) is without replacement. Also take a look at the OUTHITS option in the documentation. Mike Rhoads Westat RhoadsM1@Westat.com -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Zach Peery Sent: Monday, October 18, 2004 3:22 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Proc SURVEYSELECT Hi all, I am using Proc SURVEYSELECT to try and select 5 samples of fish catches from each ...

Re: proc surveyselect pps? #4
mah-j@statworks.com wrote back: >I would stick to what you have already done. You cannot have that >many strata if you only get a total of 83 sample points. > >Here's why: >[1] You would end up having to change a host of decimal values >into integers, and you would have to mess with adjustments in >the sample sizes to get your correct total sample size anyway. >Unless you programmed it as an operations research problem in >PROC LP. > >[2] You are making a fundamental error if you create a stratum of >size 1. You have no variance estimation AT ALL from ...

Re: proc surveyselect is inefficient? #4
Hi, I believe 1% is a significant in this case. His question I believe is similar to this: which method is better at getting 10 records from 1 billion records? -- Regards, Murphy Choy Certified Advanced Programmer for SAS V9 Certified Basic Programmer for SAS V9 DataShaping Certified SAS Professional -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Shiling Zhang Sent: Thursday, April 30, 2009 9:21 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: proc surveyselect is inefficient? No. That is not the way to go. Think about it, take a 1% of a 100 ...

Re: PROC SURVEYSELECT problem #4 685755
Thanks. Sometimes we look at things so hard, we fail to see the obvious. Just trying to juggle too many things at once. Thanks for being my eyes. Paul ...

Re: proc surveyselect problem #4 1559855
waterleaf.sas@GMAIL.COM wrote: > >please help me on the following code. > >I use SRS under proc surveyselect with rep = 2, however, the last >clientid >(15352) always select the duplicate ctrlid. the weird thing is: if I delect >all records of clientid = 15053 (or other), it works fine. > >Thanks >Jack > > >* > >data >*tmp; > >input >ClientID CTRLID $*9*-* 18* ; > >cards >; [DATASET ELIDED BY ME] >; >* > >run >*; > > >* > >PROC >**SORT*; > >BY >clientid;* > >RUN >*;* > &g...

Re: Inclusion probabilites in proc surveyselect #4
First, thanks again for your answer. In my SAS version 9.1 all the methods presented for sampling pps without replacement for n>2 are 40 years old (Sampford,and Hanurav-Vijayan). It appears they are still aproved by modern theory ( In the help about the Hanurav-Vijayan method that SAS uses as default, , SAS writes "Refer to Fox (1989), Golmant (1990), and Watts (1991) for details"). They have at least the two important features of first order inclusion prob proportional to pi, and good properties with respect to Yates-Grundy estimator. Formulae for obtaining the inclusion probs ...

Re: Proc SQL (output just matches) #4
I am still perplexed, but meanwhile I've simplified the example (no more join; no more alias). Start with this table: data b; input id $ more $; cards; 9 more-1 2 more-2a 2 more-2b 6 more-3 ; Run this code: proc sql; select b.more from (select distinct id from b); select distinct id from b; quit; The first statement's intermediate result (inner SELECT) has one column (ID) and three rows, yet the outer SELECT finds a different column (MORE) and returns four rows: more ---- more-2a more-2b more-3 more-1 The ...

Re: Add 1 row to Proc report #4
Thanks Carol, data_null and Yu for your answers. =20 The following works nicely and is intuitively obvious if you know the word BEFORE is allowed. I changed =20 BREAK AFTER to BREAK BEFORE and the 1 row was added correctly(see last line). DEFINE FLAGINDEX /ORDER order=3Dinternal FORMAT =3D $FlagName. Left = Width =3D12 "Revision" ;=20 DEFINE ST_NAME /FORMAT =3D $STNAME. "State Name" ; DEFINE &X1 /FORMAT=3D $Linkyr. Width =3D12 "&X7" ;=20 BREAK BEFORE FlagIndex / skip; *Adds blank line BEFORE THE GROUP; Thanks again, John, jbirken@cdc.gov _____ =20 ...

Upgrade to 9.1 -- PROC REPORT and ODS RTF (4)
This track doesn't affect printed outcomes, but had a dramatic impact on the log Problem Reported to SAS When I change templates sometimes RTF output becomes narrower across the page as the number of pages inceases. =============================== Tech Support Response There is a pending note that expains what is happening in your casem it is not yet edited, but will be note 10112 when it is available externally. ======================================= RTF file's output shrinks in width across pages Pending SAS Note If PROC TEMPLATE is used to set or change margins where STYLES.R...

[BUG?] $SAFE reset when proc called (1.8.4)
Hi, I'm wondering if this is a bug? When the proc is called, the safe_level is reverting to zero: $ cat safe-test4.rb pr = lambda{ puts "my_safe_level=#{Thread.current.safe_level}" } th = Thread.new(pr) do |pr_| $SAFE = 4 pr_.call end th.join $ ruby -v safe-test.rb ruby 1.8.4 (2005-12-24) [i386-mswin32] my_safe_level=0 If this isn't a bug, does anyone know why this behavior would be desirable? Thanks, Regards, Bill =20 > pr =3D lambda{ puts "my_safe_level=3D#{Thread.current.safe_level}" } >=20 > th =3D Thread.new(pr) do |pr_| > ...

Re: v6.12 to 9.1 and PROC COPY #4
(Note sure if this went through so trying again) >This is the code and error (I was told in 6.12 it translated fine). I'm on >PC sas and it may have been created in UNIX. > > >libname trandata xport 'c:\testxpt\datasap.xpt'; > >libname rawdata 'c:\testxpt'; > >proc copy in=trandata out=rawdata; >run; > > >And this is the error > >NOTE: Input library TRANDATA is sequential. >NOTE: Copying TRANDATA.MYDATA to RAWDATA.MYDATA (memtype=DATA). >NOTE: BUFSIZE is not cloned when copying across different engines. > System O...

Re: PROC SURVEYSELECT exclude from sampling, include in data #4
> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Joe > Matise > Sent: Monday, February 22, 2010 8:44 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: PROC SURVEYSELECT exclude from sampling, include in data > > Ahh, that should work. Figured there would be something to work around it > with, just couldn't think of it - thanks! > > -Joe > > On Mon, Feb 22, 2010 at 9:30 AM, Data _null_; <iebupdte@gmail.com> wrote: > > > correction to rename option... > > > > out=samp(rename=(se...

Re: Monte Carlo and Proc SurveySelect macro loop #4
Look at the following code and see it you think it would work for you. CASE is strata and used in SAMPSIZE data. One call to SURVEYSELECT. %LET BEGIN = 1; %LET END = 3; data work.test; input Cust Stratum BinWidth; do case=&begin to &end; output; end; cards; 1 1 0.253705 2 1 0.253705 3 2 0.184175 4 2 0.184175 5 3 0.041413 6 3 0.041413 7 3 0.041413 ;;;; run; proc sort; by case; run; data work.sampsize; do case=&begin to &end; _NSIZE_=case; outpu...

Re: Proc SurveySelect
Dan, Sorry for not being detailed enough. Only in some bizarre instance would SS*N equal the total number of observations. Say I have 10 different treatments. I am trying to pull equal numbers of individual records from a dataset so I have a balanced design at the start -- I will freely admit, this is not crucial for this example as the response rates will vary, so we'll end up with unequal groups at the conclusion. Depending upon how many individuals I have, and how much money, I could be using some, most or all of my records. I appreciate your approach, and will save the code for ot...

Re: Upgrade to 9.1 -- PROC REPORT and ODS RTF (4)
Oops, cust and paste is bad sometimes ... ignore this line "This track doesn't affect printed outcomes, but had a dramatic impact on the log" Don On Thu, 1 Apr 2004 18:41:25 -0500, Don Stanley <don_stanley@PARADISE.NET.NZ> wrote: >This track doesn't affect printed outcomes, but had a dramatic impact on >the log > >Problem Reported to SAS >When I change templates sometimes RTF output becomes narrower across the >page as the number of pages inceases. > >=============================== >Tech Support Response >There is a pending note that e...

Re: Proc export without the column names in record # 1 #4
That appears to work quite well. Nat Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 "./ ADD NAME=Data _null_," <iebupdte@gmail.c To om> Nathaniel.Wooding@dom.com cc 08/14/2008 07:54 SAS-L@listserv.uga.edu AM ...

Re: many to many match merge using PROC SQL #4 642498
Thanks all of you for your kind reply. You guys are awesome. Grace ...

Re: many to many match merge using PROC SQL #4 1546129
Grace: SQL offers different forms of key joins as alternatives to the archaic and restrictive SAS Data step merge. An INNER JOIN on county and year yields the intersection of both keys in two datasets. A FULL JOIN yields the union of the INNER JOIN and the set complements of the intersection of the keys. You may expect to see the results of a FULL JOIN when you combine data from the two tables. A SESUG paper entitled Structured Query Language: ... provides details. Any of the forms of SQL joins handle many-to-many relationship between common keys in two tables (although the results may surpri...

Support of x.4.1
Hello, One more time this issue. Can I expect help if I use latest stable version (x.4.1), too? With regards, Lukas Gr�tzmacher AIS Automation Dresden GmbH > -----Original Message----- > From: Douglas C. Schmidt [mailto:schmidt@cs.wustl.edu] > Sent: Tuesday, February 15, 2005 4:02 PM > To: tao-bugs@cs.wustl.edu; Gr�tzmacher, Lukas > Subject: [SPAM] - Re: [tao-bugs] No matching endpoint found > anymore - Found word(s) check out in the Text body > > Hi Lukas, > > Thanks for using the PRF. > > >> TAO VERSION: 1.3...

Condition System; handlers simultaneously matching in the same binding form; CLHS 9.1.4
Hi, CLHS 9.1.4 states: Once a handler in a handler binding form (such as handler-bind or handler-case) has been selected, all handlers in that form become inactive for the remainder of the signaling process. While the selected handler runs, no other handler established by that form is active. That is, if the handler declines, __no other handler established by that form will be considered for possible invocation__. However, I don't understand the behaviour of the following snippet in light of the above paragraph: (handler-bind ((error #'(lambda (e) (format t "ERR...

Re: proc mixed model with ar(1) processes inter and intra blocks #4
--- shiling99@YAHOO.COM wrote: > Thanks Dale! > > You suggest that > > u1 = 0.7*u0 + sqrt(1-0.7*0.7)*rannor(seed); > > then the mixed model reports residual estimation will be around 1 or > > var(u1)={1/(1-rho**2)}*{sqrt(1-0.7*0.7)}**2=1 > > The variance estimation in ARIMA procedure will report > > var(sqrt(1-0.7*0.7)*rannor(seed))={sqrt(1-0.7*0.7)}**2 > > that will be around 0.5. > > It is the same as mine in concept at least. But my notation may cause > confusion. > > u1=rho1*u0+err1 (sas notation with u0=u1 af...