Course in Generalized Linear Models with Biological Applications

at 30 November 2007

In spring 2008 (start: 25. February) our reserach group offers a course in generalized linear models with biological applications.

The course introduces the modeling (regression analysis) of non-normal observations as for example counts and proportions. Methods to handle correlated observations will also be introduced. The lectures are accompanied by computing exercises using the statistical package ‘R’. Due to its versatility and graphical capacities it has something to offer even to the experienced SAS user.

The course is open to everyone with basic statistical knowledge. The course is free of charge for PhD students. It is also free for students and employees affiliated to Aarhus University. The course is approved as a PhD course (10 ECTS points) at Aarhus University.

For additional information please check the course homepage

Best regards

Ulrich Halekoh

New versions of Windows Live Writer and JabRef

at 20 November 2007

Lars has previously blogged about Windows Live Writer and JabRef. Both programs have now been updated. Visit Writer Zone: Windows Live Writer: Out of Beta or the JabRef page at SourceForge to download the new versions.

How to reconfigure a keyboard

at 15 November 2007

Recently we held an the introductory R-course. In R you need to use the tilde (~) sign often. Everytime you specify a statistical formula, you write something like:



Y ~ Treatment + X



One of the participants had a keyboard on her (italian) laptop that had no '~' sign. As one of the participants could remember, that is no problem. You simply type the ASCII-code of '~' (126) on the numeric keypad while you hold down the 'Alt' key. And of course, on a laptop without a numeric keyboard you simply find the blue 'fn' key and the blue 'num lock' key and push them down simultaneously, then you type the ASCII code with the Alt key pressed, and then the blue 'fn' key and the blue 'num lock' key again. (If you forget the final part, 5t 5s act4a33y n4 *r6b3e0, s60e 6f the 2eys are s50*3y re*3aced w5th n40bers, oops - I meant to say, it is actually no problem, some of the keys are simply replaced with numbers).


The R-Help list had some discussion concerning this problem in 2004, where the solution above was suggested.

However, the satisfactory solution is to remap the keyboard. Microsoft has a utility program for doing this. You may download it from the Microsoft Keyboard Layout Creator. For Windows XP you probably need the old version (1.3), while Vista users can use version 1.4.


The instructions in the help menu are easy to follow. I'll just show a couple of screen dumps. First of all I load an existing keyboard via the File | Load existing keyboard option. I choose the Danish keyboard. The program then shows an image of the existing keyboard layout.





By selecting the different shift states, you may see the key mapping in the corresponding states. As an example, the AltGr shift state below.





In fact I have already changed the keyboard mapping. As you an see the keyboard now shows a '~' sign corresponding to the 'N' key. In order to obtain this mapping I simply clicked on the key in the screen image. A popup window allowed me to type the '~'-sign and he redefinition was made. (If your keyboard does not have the '~' sign you need to use the trick with the numeric keyboard and Alt 126 as described above).

Finally, you choose Project| Build DLL and setup Package, as described in Help file of the program. This produces an msi-file that can be executed and your new keyboard is installed.



So now I have a keyboard that produces a a tilde sign when I press AltGr+N. In contrast to the existing one (next to the Enter key in the right hand side) this one is not a dead key. I do not need to wait for another keypress to see the '~'sign.


Another option is to use e.g. AutoHotkey.

How to import SAS data set into R

at 07 November 2007

The import of data into R is still a bit complicated if the original data are stored in the SAS-data format. Though solutions have existed for a long time, see e.g. the R-documentation concerning Importing from other statistical systems, it is complicated to use these facilities. They are based on functions which need to call the SAS-program from R. The settings for doing this do not always correspond to the settings on the computers we use.

I have written a short note/web-page with focus on the export problem from the SAS point of view. The note compares three different intermediate formats: csv, xls and xport format.

In normal use, the route via the xls format seems best. Data are exported via SAS code similar to:

 
libname sasdata "C:/SASImport";
libname out Excel
"C:/SASImport/file798b12e1.xls";
data out.rimporttest;
set sasdata.rimporttest;
run;

and imported into R via the read.xls command in the xlsReadWrite package.


Further detail in the note, which also includes R-functions. The note is also available as a pdf-file