From Stata to SAS Code

New Contributor
Posts: 3

From Stata to SAS Code

Greetings all,


Can anyone help me to translate this code from stata to SAS :

. qui gen repsample=.
. qui replace repsample=0 if shaname=="North East"
. repsample 20, cont(listsize soaimd07) bincat(ruralvar) randomperc(30)
> seednum(16) retain(repsample)


Thank you.

Super User
Posts: 13,930

Re: From Stata to SAS Code

[ Edited ]
Posted in reply to SASLeaner336

Most of us on the SAS forum have little or no experience with STATA. You may get better help if tell us what that STATA code is supposed to actually do.

As a minimum you might at least list your existing SAS variable names and which are numeric and which are character.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation