Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: A STATA code for verification of a check digit


From   Chantal Mascarenhas <Chantal.Mascarenhas@mep.ki.se>
To   statalist@hsphsun2.harvard.edu
Subject   st: A STATA code for verification of a check digit
Date   Wed, 14 May 2003 17:38:13 +0200

Title: Message
Sorry about sending this twice I think the first one was too long, so I just sent the link explaining it in SAS.

 
Hi!  I would like to know if there is a STATA code to use for verification of a check digit like the one used in SAS.  This applies to the Swedish Personnummer that everyone has in Sweden.  It is comprised of 10 digits (12) if the century is included.  The first 6 are the birth date in YYMMDD followed by a 3 digit birth number and a last digit which is a check digit comprised of the previous 9 digits calculated by algorithm. 
For example, 780924 0505
 
Here is a description of how it works in SAS: 
 

 http://www.pauldickman.com/teaching/sas/pnr_check.html 

Thanks and very curious,
Chantal.
 



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index