BookmarkSubscribeRSS Feed
Pabster
Obsidian | Level 7

Hey!

I am trying to do a Paired sample analysis using the stratified random basis.
I have 2 data sets (see link at the end to download them if needed):
-The first one is full of Inactive/Bankrupt companies at a given time (chosen by me)
-The second one is full of Active companies

What I need to do is to Pair , by industry and by a limited size (between 1-25 asset size(AT)), an Active company to each Inactive company in my first data set.

I know there is a PROC function called SURVEYSELECT but I haven't been able to grasp it properly.
Hope you guys can help me!

Here`s the link to download the data sets:

https://wetransfer.com/downloads/b5ca64d2fa3cad610913536c77e1589020190312165556/dca9ea7167f20133e26b...

2 REPLIES 2
PaigeMiller
Diamond | Level 26

I'm not sure I understand what you are trying to do.

 

You want to do some stratified random sampling ... okay ... but you have to specify how to do the stratifying, and I don't see that you have done this.


Furthermore, the concept of pairing in this situation isn't explained either.

 

I think more information would help.

--
Paige Miller
Pabster
Obsidian | Level 7

Okay,

So my data looks like this:
active.png

and like this:

Inactive.png


I need SAS to randomly select an ACTIVE(so the COSTAT of the company =0) company from the Active data set and pair it to an Inactive company(COSTAT=1) from my second data set.
The pairing only has two constraint, the active company must be in the same industry as the inactive one (same SIC) and the same Fyear for proper analysis.

 

My final set should look somehow like this:

DATADATE FYEAR DLRSN CONM DLDTE COSTAT SICH

03/12/1992 1989            .          A                        0         112

03/12/1993 1989             02      B        1990        1         112

03/12/1994 1990           .           D                        0         333

03/12/1992 1990            03        F        1992       1         333

03/12/1993 1994          .             J                         0        445

03/12/1994 1994          03          L         1996      1          445

03/12/1998 1998          .             I                        0          001

03/12/1998 1998          02         Z         2000       1          001



Is it more clear?

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 707 views
  • 0 likes
  • 2 in conversation