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?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

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
  • 531 views
  • 0 likes
  • 2 in conversation