Saturday, October 29, 2016

SAS high resolution image output and CMYK with Gimp

I was struggling with generating a 600dpi image output from SAS. It was a ROC curve from a logistic regression model that is needed to be published as CMYK at 600dpi resolution.  I tried different output destinations like PDF, RTF and HTML. It was either impossible to extract the image from embedded destinations or the resolution was unsatisfactory and seemed not to be refined. After some reading, I found out that it is possible to output each image separately (since the output of logistic regression contains many images). I have used the following code to generate high resolution images into a folder I specified
ods listing gpath="C:\Users\path" image_dpi=600;
ods graphics  on/ reset=all imagefmt=png  imagename="anyname";
proc logistic data=mydata plots(only)=(roc);
model Dependent(event='Present') = Independent ;
roc 'Variable' Independent ;
run;       
ods graphics off;
ods listing close;
I actually needed tiff images but all the time when it generates it reported a java exception about memory size exceed. I had enough ram and memory allocated, but I could not find a solution. Later I decided to try another format, png and it worked. I got high resolution png images and converted them nack to tiff using Gimp.
But the story did not end here because the images should have had CMYK color scheme. I was using Gimp, a free image manipulation program and it was not easy to fine-tune Gimp to make CMYK outputs.
After some search I found out that there is a plugin called seperate+ which lies in here . I recommend installing separate+-0.5.8+lcms2_win32_bin.zip file because it does not require libtiff3.dll which is a needed file if you install the other zip file. But installing it is not enough, you need to find some icc profiles for CMYK scheme. Adobe offers such files, an internet search can reveal. After installing them into correct folder which is inside system32 folder in Windows, one can use them together with seperate plugin and convert a RGB image to CMYK using Gimp.

Tuesday, June 21, 2016

Testing homogenity of variances

The statistician Box once said “To make a preliminary test on variances is rather like putting to sea in a rowing boat to find out whether conditions are sufficiently calm for an ocean liner to leave port” (1953,Biometrika, 40, p.333).

Friday, June 3, 2016

An intersting debate I have found on net

I have found a debate through some researchers on the net, it was interesting to read
http://challengingbell.blogspot.com.tr/2015/05/further-numerical-validation-of-joy.html
https://www.researchgate.net/publication/285439686_Macroscopic_Observability_of_Spinorial_Sign_Changes_A_Simplified_Proof#feedback/235509

Fundamentals of Biostatistics

A good book to go for introduction to Biostatistics is by Bernard Rosner, Fundamentals of Biostatistics.

Wednesday, March 16, 2016

Contrasts for ANOVA in R

A note to myself:
contrast function in rms package seems to be useful when forming contrast matrices.
glht function from multcomp package has a usage like
tmp <- expand.grid(tension = unique(warpbreaks$tension),wool = unique(warpbreaks$wool))
 X <- model.matrix(~ wool * tension, data = tmp)
 glht(mod, linfct = X)
There is an overwhelmingly big contrast package.