2012-12-30

National idenftification number: Finland

The Finnish Social Security number (FSSn) is a common variable in a Finnish population based study. Within FSSn are individuals birthday, and gender. We can also check if the FSSn correct because it has a check digit. If the data doesn't have birthday and gender variables or you want to check are they correct you can use the FSSn to do so.

FSSn has the form xxxxxxyzzzq. Where x:s denote persons birthday in the form of ddmmyy, and y is the century character. y can currently be + for 1800, - for 1900 and A for 2000. Persons gender can be seen in the zzz which can be thought of as individualizing numbers. zzz is an odd number for males and even for females. q is the check digit.

Function for the birthday would be.
#Given FSSn a vector of FSSn's
finID.bd = function(FSSn){
 
 FSSn = matrix(FSSn, nrow = length(FSSn)) 
 birthdays = apply(FSSn, 1, function(x){ 
  
  century = c("+", "-", "A") %in% substr(x, 7, 7)
  century = c("18", "19", "20")[century]
  x = paste(substr(x, 1, 2), substr(x, 3, 4), 
            paste(century, substr(x,5,6), sep=""), 
            sep="/")
   return(x) 
 }
 )
  birthdays = as.Date(birthdays, format = "%d/%m/%Y")
 return(birthdays)
}


and for the gender
#Given FSSn a vector of FSSn's

finID.gender = function(FSSn, labels=c("female", "male")){
 
 FSSn = matrix(FSSn, nrow=length(FSSn))
 gender = apply(FSSn, 1, function(x){
                      x = as.double(substr(x, 10, 10)) %% 2 })
 return(factor(gender, levels=c(0,1), labels=labels))
}
Function for checking correctness of the FSSn and generating random FSSn's will be given later.

2012-12-27

Well isn't this nice Syntax highlighting
test.function = function(r) {
    return(pi * r^2)
}
test.function(1)
Now we can finally have some actual content in here. Hopefully content and not "content".

Lorem Ipsum

Lorem ipsum dolor sit amet, duo modo nulla quodsi cu, pri viderer accusata te. Ipsum dictas alienum ea vel. Delectus adolescens ea mei, dico vocibus has ne, iusto putant percipit his ad. Cu unum etiam conclusionemque cum. Et vis adhuc detraxit reprimique, ne mea appareat eleifend, cu eleifend inimicus philosophia nec. Eum cu labore facete causae, eos te lorem scaevola vituperatoribus, modo lucilius mei no.

Purto cibo nec ne, eu utamur periculis his. Aperiam maiestatis ex qui, sanctus legendos urbanitas ne eum. Et cum praesent definitionem. Duis vidit inermis nec id, habemus consulatu sadipscing ad mei.

Vis solum complectitur no. Cu diceret constituto reprehendunt nam, te melius timeam deseruisse mea, te eum sumo platonem. Forensibus adipiscing dissentias ex nec, cum ea quem liber. In pri sumo mollis, quas pertinax pertinacia ne eos. Quis erroribus consectetuer et cum, possim tibique cu mea, ea pro verear bonorum. Vix ex summo altera. Mel mucius oporteat cu.

Postea aliquip definiebas ad quo, has aeque pertinacia et. Quando corpora ad pro, iusto libris in his. Sit te quis delicata, ea altera omnium has. Ad docendi salutatus vix. Eu dicta molestiae nec, pro te abhorreant consectetuer. Id augue detracto eum, apeirian indoctum adversarium nam no, cum assum quodsi ad.

Nam an minim dicit. Eu labores consectetuer his, et sed dicant primis equidem. Commodo corpora ius eu. Iuvaret imperdiet ut mei, an aeque veniam vis, mel ex veri probo. Nostro accommodare ea duo, ea dictas meliore tractatos has, id nec harum putant expetenda.

The template seems nice... And hello to you too, seems a bit late doesn't it?
Reference: wiki / Lorem ipsum

How to input some actual code here...