Skip to main content


Indlæsning af data i RedCap

 Data import i RedCap, første video om RedCap funktionalitet
Recent posts

The power of SAS Proc SGPLOT: Survival Plots

Obtaining the power of SGPLOT using ods output features. In the example below I have placed the y-axis label in top horizontal position using a yaxis statement option in SGPLOT. The code in my macro is based on the file found on  Mantange's SAS blog Here is a link to my example and macro . The macro is easy to modify.

RF shields: Further investigations

I previously investigated the effect of a metal mesh: Would I be able to construct an RF shield using the principles behind Faraday's cage. The success was limited, there is a loss of field strength, the signal, however, was intact. Is there another solution? Passive measures are becoming increasingly popular. At the local hardware store, I can buy a one square meter carbon knitted mesh at the price of 23 euro. I assume the cost will double if I cover my walls with the mesh unless I am extremely careful. Better do an overlay than introduce weak spots. Other measures are powder (iron, steel, carbon) glued or painted on surfaces. A short cut is ventilation pipes. They come in diameters greater than a meter. Up to a diameter of 63 centimeters, you can even buy end pieces in metal. I performed an experiment with a 10cm diameter ventilation pipe. Most people demonstrate Faraday's cage with a mobile phone, and some people use an AM or FM radio. I prefer to use an attenuated 400

COVID19 and the Politik surrounding it

Danish authorities ( document the development in cases and deaths, both in the EU/EØS and on a global scale. In the previous weeks, I have seen a risk of death around 4 percent. Update 27/3-2020: In Italy, we observe a risk of death greater than the risk of death from SARS. I expect a wave of viral spread in Europe from Italy and Spain through France and Germany and exponential growth in number of cases for weeks to come. The novel virus will take its toll the next years in symbiosis with influenza. Hundreds of thousands will die changing the hygiene culture and demanding reform of health services in the Western world. The development in Japan is now worse than a month ago. Japan remains the most successful nation relative to its population size. Links to monitoring tools and sites:

Simulation of hemophilia bleeds

A SAS simulation study describing bleeds in hemophilia type A and B patients. Based on the "proof-of-concept study" Randomized, prospective clinical trial of recombinant factor VIIa for secondary prophylaxis in hemophilia patients with inhibitors by Konkle et. al. published in Journal of Thrombosis and Haemostasis, 5: 1904-1913 in 2007. The epidemiology and design of the study are not in accordance with CONSORT and SPIRIT as of December 2019. We observe 22 included patients (11 in each group) allocated from 20 sites in 11 countries. Neither the randomization nor the analysis is stratified by center, and it is possible to question the logistics of the experiment. People have asked if a condition on the number of bleeds (above 4 for each month in the pre-prophylaxis period) introduces bias: The study is a comparison of the effect of dose-difference not the effect of the drug, although the mean of bleeds in the first period is obviously higher than in the second period. Suspic

Indicators from numeric factor variables

The macro call below will generate indicators for all factor levels of xfaktor from the data set regdata represented by at least 5 observations. I have developed the macroes to avoid class variables in SAS regression analyses. %indicator(xfaktor,regdata,5); /* Macro to generate dummy variables. */ %MACRO GETCON;   %DO I = 1 %TO &N;   %IF &&M&I NE 0 %THEN %PUT &factor&I;   %IF &&M&I = 0 %THEN %GOTO OUT;     IF &factor = &&M&I THEN &factor&I = 1;     ELSE &factor&I = 0;   %OUT: %END; %MEND GETCON; %macro indicator(factor,dataset,size); data tbl_data_; set &dataset(keep=&factor); run; proc sort data=tbl_data_; by &factor; run; data tbl_; set tbl_data_; by &factor; retain sz; if first.&factor then sz=1; else sz=sz+1; if last.&factor then output; run; PROC SORT DATA=tbl_(where=(sz GE &size)) OUT=UNIQUE NODUPKEY;   BY &factor; RUN; /* Assign the largest value o