[R] Passing arguments to panels in trellis plots

2006-12-13 Thread Marco Chiarandini
Dear all,

I am trying to produce survfit plots in a trellis environment and I
would like the plots to be logarithmic.

I am trying this:

print(Ecdf(~time | size*type, groups=alg,data=B,subscripts=TRUE,
panel=function(x,groups,subscripts)
{
  t - 
survfit(Surv(time[subscripts],event[subscripts])~groups[subscripts],data=B)
  panel.xyplot(t[1]$time,1-t[1]$ssurv,type=s,lty=2)
  panel.xyplot(t[2]$time,1-t[2]$ssurv,type=s,lty=2)
},
   scale=list(log=TRUE)
)



but data are transformed in logarithm before being passed to the panel
and hence the output of the function survfit is not the expected one.

Is there a way to plot this correctly, ie, having first the survfit
computed and then the plot, like in:

plot(survfit(Surv(time,event)~groups,data=B),log=true)

Thanks in advance.

- Marco.


--
Marco Chiarandini http://www.imada.sdu.dk/~marco
Department of Mathematics Email: marco AT imada.sdu.dk
and Computer Science, Phone: +45 6550 4031
University of Southern DenmarkFax: +45 6593 2691

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Passing arguments to panels in trellis plots

2006-12-13 Thread Marco Chiarandini
Dear Deepayan,


 Since you haven't bothered to follow the posting guide at all, it took
 me a while to figure out that you live in that alternate R universe
 created by Prof Harrell. Can't help you there, but in the standard
 universe, things seem fairly simple:


I am sorry for not having been clear. I hope this time I get closer to
the correct post practice.

Here is what I am trying to do:

D - expand.grid(rep=c(1:10),b=c(M,N),a=c(10,20),alg=c(A,B))
D1 - data.frame(D[,c(2,3,4)],time=runif(80,1,100))
D2 - data.frame(D1,event=rbinom(80,1,0.9))

library(survival)
library(lattice)
library(Hmisc)
Ecdf(~time | a*b, groups=alg,data=D2,
  subscripts=TRUE,
  panel=function(x,groups,subscripts)
  {
t -
  
survfit(Surv(time[subscripts],event[subscripts])~groups[subscripts],
 data=D2,type=kaplan-meier,
 conf.type=plain,conf.int=.95, se.fit=T)
panel.xyplot(t[2]$time,1-t[2]$surv,type=s,lty=2)
panel.xyplot(t[1]$time,1-t[1]$surv,type=s,lty=1)
  }
   )


Although not very elegant this does the job. Nevertheless, when I try to
add:

scales = list(log=TRUE)

in the Ecdf fucntion above I incurr in problems because the
transformation of data occurs before applying the function Surv.

Hence my question, is there a way to plot survfit in trellis plots with
different strata (the alg factor above) in the same plot and conditional
to combination of other factors (the a and b factors above)?


Here is my sessionInfo():

R version 2.4.0 (2006-10-03)
i686-pc-linux-gnu

locale:
LC_CTYPE=en_DK.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C

attached base packages:
[1] grid  splines   methods   stats graphics
grDevices
[7] utils datasets  base

other attached packages:
Hmisc  lattice survival
  3.1-2 0.14-9   2.29


Regards,

- Marco.


--
Marco Chiarandini http://www.imada.sdu.dk/~marco
Department of Mathematics Email: [EMAIL PROTECTED]
and Computer Science, Phone: +45 6550 4031
University of Southern DenmarkFax: +45 6593 2691

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Survfit plots in trellis graphics

2006-12-09 Thread Marco Chiarandini
Dear all,

is there a way to produce survfit plots in a trellis environment?

I am trying this:

print(Ecdf(~time | size*type, groups=alg,data=B,subscripts=TRUE,
panel=function(x,groups,subscripts)
{
  t - 
survfit(Surv(time[subscripts],event[subscripts])~groups[subscripts],data=B,conf.type=none)
  panel.xyplot(t[1]$time,1-t[1]$ssurv,type=s,lty=2)
  panel.xyplot(t[2]$time,1-t[2]$ssurv,type=s,lty=2)
}
)



but things get messed up if I try log transformations and to plot
confidence intervals.


- Marco.


--
Marco Chiarandini http://www.imada.sdu.dk/~marco
Department of Mathematics Email: marco AT imada.sdu.dk
and Computer Science, Phone: +45 6550 4031
University of Southern DenmarkFax: +45 6593 2691

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] wireframe (reloaded): how to remove the frame around my plot?

2005-05-11 Thread Marco Chiarandini
Hello,


I would like to remove the frame from wireframe, but that one only.

I am currently doing

trellis.par.set(axis.line,list(col=NA,lty=1,lwd=1))

but this has the flaw that also the tick lines of the axes disapper.

I read all the thread with the same titlee of this message appeared
sometime ago on this list and tried all the methods there suggested but
I am still facing the problem.

Is there any possible solution?

Thank you for your consideration.


Marco



---
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E312
Tel: +49.(0)6151.166802 Fax: +49.(0)6151.165326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Problems using html and dvips of Hmisc

2005-05-01 Thread Marco Chiarandini
Dear all,

I am experiencing the two following problems trying to produce a
comfortable output using the package Hmisc.

If I use:

html(latex(D,file=here.tex),file=here.html)

where D is a data.frame the function html does not write in here.html but
only in a temporary file somewhere else in my PC (latex instead
writes correctly in the file here.tex.

If I use

dvips(latex(D),file=here.ps)

everything runs smooth but if the
data frame is quite large I am not able to center it properly in
the output file .ps. The table always stays high on the page
going out from the upper side of the paper.

I tested this two unwanted behaviours both under linux and under MacOsx
and the packages are all up-to-date.


Thank you for the consideration.

Regards,

Marco

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Handling very large integers with factorial and combinat (nCm)

2005-04-04 Thread Marco Chiarandini
Dear list,

perhpas this question is more suitable for R-dev but since I am not
really a developer I post it here first.

Apparently the following lines do not create any problem in R:

library(combinat)
r - 20; b - 2;
sum( sapply(0:r,function(x) nCm(r,x)^(2*b)) )  2^64

while in C I obtain an overflow of data even using unsigned long long
and with long double I incurr in precision problems.

Where can I find information about how R (or the combinat package)
handles very large integer numbers?


Thank you for consideration,


Marco

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Wilcoxon test for mixed design (between-within subjects)

2005-01-24 Thread Marco Chiarandini
Hallo,

is there any extension of the pairwise Wilcoxon test to a dependent
samples layout with replicates (or, in other terms, a one-way layout
with blocking and replicates)?

The Wilcoxon method with matched pairs works for the case of dependent
samples with one observation per block, while the Mann-Whitney test
works for independent samples, thus one single block and replicated
observations. Is there a method which mixes this two cases considering a
depedent sample design in which each block has more than one
observation? I know it exists a Friedman test for this case but in the
Friedman test ranks are constructed considering all subjects jointly,
while in Wilcoxon only the pair of subject currently considered are
ranked, thus resulting in a more powerful test.

If no such method exists in R, I am anyway intersted in possible
references.

Thank you for the consideration,

Regards,

Marco

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Wilcoxon test for mixed design (between-within subjects)

2005-01-24 Thread Marco Chiarandini
Hallo Christoph,


 There is always the possibility to summarize the replicates and
 then calculate a common pairwise Wilcoxon test.


mmmh, in this case I prefer the Friedman test, I would like not to loose
any data.


 The Friedman test calculates the ranks inside of the blocks, for
 each block separately and is not considering all subjects
 jointly.


true, but it considers all the treatments together, while Wilcoxon works
per pairs of treatments within the blocks.


 In R implemented is the case with unreplicated blocked data, so
 this doesn't help you.

   If no such method exists in R, I am anyway intersted in possible
   references.

 Look at:

  Myles Hollander  Douglas A. Wolfe (1999), _Nonparametric
  statistical methods_. New York: John Wiley  Sons.

 There you find the generalization of the replicated case, but
 you have to implement it.


I already implemented the Friedman test for the replicated case although
taken from Conover 1999 _Practical non parametric statistics_. I hope it
is the same. My interest in a Wilcoxon procedure is due to the fact that
according to Hsu 1996 _Multiple comparisons_ the Friedman test is not
recommended for multiple comparisons becasue it has been shown that it
is not a confident method (the actual alpha value is greater).


Regards,


Marco



---
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E312
Tel: +49.(0)6151.166802 Fax: +49.(0)6151.165326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Empirical cumulative distribution with censored data

2005-01-16 Thread Marco Chiarandini
Dear list,
I would like to plot the empirical cumulative distribution of the time 
needed by a treatment to attain a certain goal. A number of 
experiments is run with a strict time limit. In some experiments the 
goal is attained before the time limit, in other experiments time 
expires before the goal is attained. The situation is very similar to 
survivial analysis with censored data. I tryed the function:

plot(survfit(Surv(time),data=mydata,conf.int=F))
from the package survival. Nevertheless, what i would like to see is 
an increase of probability as time increases, and not a decrease of 
survival probabilty. I tried to play with ecdf(), but dealing with the 
censored data is quite hard-working in this case.

Is there anything for censored data in ecdf like-functions or a way to 
adapt plot.survfit to my case?

Thank you for consideration,
Ragards,
---
Marco Chiarandini,
Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Empirical cumulative distribution with censored data

2005-01-16 Thread Marco Chiarandini
Peter Dalgaard wrote:
Marco Chiarandini [EMAIL PROTECTED] writes:

Dear list,
I would like to plot the empirical cumulative distribution of the time
needed by a treatment to attain a certain goal. A number of
experiments is run with a strict time limit. In some experiments the
goal is attained before the time limit, in other experiments time
expires before the goal is attained. The situation is very similar to
survivial analysis with censored data. I tryed the function:
plot(survfit(Surv(time),data=mydata,conf.int=F))
from the package survival. Nevertheless, what i would like to see is
an increase of probability as time increases, and not a decrease of
survival probabilty. I tried to play with ecdf(), but dealing with the
censored data is quite hard-working in this case.
Is there anything for censored data in ecdf like-functions or a way to
adapt plot.survfit to my case?

Did you try the fun=event argument?

Now yes.
It does what I want indeed.
Thank you a lot!
Marco
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Friedman test for replicated blocked data

2004-12-13 Thread Marco Chiarandini
Hi,

I would need to extend the Friedman test to a replicated
design. Currently the function: friedman.test(y, ...) only works for
unreplicated designs.

I found in Conover 1999 Practical Nonparamteric statistics an
extension of the formula to my case.

Nevertheless, other sources, like Sheskin 2000 Parametric and
Nonparametric statistical Procedures and Daniel 1990 Applied
nonparametric statistics give a different formula from that of Conover
in the unreplicated case. Since they do not provide the extension of
this formula to the replicated case I would like to know if someone
could give me a reference where I could find such extension. The formula
is indeed very simple:

F= z \sqrt{bk(k+1)/6}

where z is a quantile from the normal distribution, b the number of
blocks and k the number of treatments.

Unfortunately, the sources cited do not provide indications from where
the formula comes from.


Thank you for consideration,


Greetings,


Marco


--
Marco Chiarandini,
Technische Universitaet Darmstadt

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] organising the display in Trellis plots

2004-12-03 Thread Marco Chiarandini
Hallo,

I would like to organise at my pleasure the layout of a trellis plot.

Currently I have a 3x3 matrix display and 7 plots. Is it possible to
choose which specific panels will stay empty?

I tried index.perm to arrange the order. Then there is perm.cond which I
could not understand if it can serve for my purpose since I cant really
find which kind of data it accepts.

Thank you for the help.


Marco

P.S.  I attach some code.

plot - Dotplot(algo~Cbind(y,lower,upper) | group,data=OUT,
  pch=3, method=bars,pch.bar=2,lwd=3,
  cex=0.8,
  par.strip.text=list(cex=1),
  panel=function(x,y,...) {
print(attr(x,'other'))
panel.abline(v=attr(x,'other'),lty=2,col=grey70)
panel.Dotplot(x,y,...)
  },
  scales = list(cex=1,rot=c(0,45),

x=list(alternating=c(1,1,1,1),limits=c(1,nlevels(OUT$algo)),relation=same),

y=list(at=c(1:nlevels(OUT$algo)),labels=levels(OUT$algo),alternating=c(1,1,1,1))
),
main=list(label=),
  xlab=list(cex=1,label=Average rank),
  ylab=,
  aspect=fill,as.table=FALSE,
  layout=c(3,3)
  )
print(plot)
update(plot,perm.cond=c(3,2,1,4,5,6))  #this does not work
update(plot,index.cond=c(3,2,1,4,5,6))  #this works it does not what I wish

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Re: R package installation

2004-11-18 Thread Marco Chiarandini
Dear Prof. Johnson,

sorry for posting the reply so late.

I am already using FINK. But you were right, R was looking for g77 and
the gcc libraries under the MacOs distributions.

Rather than creating symbolic links I updated FLIBS in
/Library/Frameworks/R.framework/Resources/etc/Makeconf
so that it searches in the right path
/sw/lib/gcc/powerpc-apple-darwin7.2.0/

For g77 I made instead the link you suggest under /usr/bin/.

I removed and reinstalled the package and everything run fine, in spite
of my versions of libraries and compilers (g77 was already up-date from
FINK).


Thank you all for the help,


Marco



 Dear Marco,

 I was given an excerpt with your problem about installing package on
 a MAC, such as Hmisc.

 I had the same problems and found a work around.

 I have not had any trouble loading in source packages since, include
 Hmisc and Design, acepack and vgam.

 First, I downloaded and installed the g77 compiler.

 I use a progam named FINK to find, download and intall g77 (so first I
 installed FINK
 then from within FINK I downloaded/installed the g77 compiler.) Do a
 Google search
 for FINK, it is easy to find and install.

 After g77 was installed I had to make a symbolic link so R could find
 it:

 ln -s \sw\bin\g77 \usr\bin\g77  (I think I had to make a link to my gcc
 compiler also)
 \n -s \sw\bin\gcc \usr\bin\g77

 It looks like you already have the g77 compiler from the message.  the
 next mesage you can also remedy by symbolic links.  Try

 ln -s /sw/lib/gcc   /usr/local/lib/gcc
 ln -s /sw/lib/gcc/powerpc-apple-darwin7.5.0
 \usr\local\lib\gcc\powerpc-apple-darwin6.8
 ln -s /sw/lib/gcc/powerpc-apple-darwin7.5.0/3.4.1
 \usr\local\lib\gcc\powerpc-apple-darwin6.8\3.4.2

 The first directory path in each of the above may be specific to your
 configuration for gcc.

 But this did work for me, and if you find the correct location for gcc/
 powerpc-apple-darwinX.Y.Z/U.V.W, you should have no trouble either.

 Good luck.

 Sincerely

 Tim Johnson
 Adjunct Asst. Professor
 University of Michigan



---
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E317
Tel: +49.(0)6151.166802 Fax: +49.(0)6151.165326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Problems installing packages on MacOS with R 2.00

2004-11-15 Thread Marco Chiarandini
Dear all,
I have a problem installing a package required by Hmisc on MacOS 10.3.5  
with R 2.00.

g77   -fno-common  -g -O2 -c avas.f -o avas.o
g77   -fno-common  -g -O2 -c rlsmo.f -o rlsmo.o
gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o  
acepack.so ace.o avas.o rlsmo.o  -L/usr/local/lib  
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2  
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -lfrtbegin  
-lg2c -lSystem -lcc_dynamic -framework R
ld: warning -L: directory name  
(/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2) does not exist
ld: warning -L: directory name  
(/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../..) does not  
exist
ld: can't locate file for: -lfrtbegin
make: *** [acepack.so] Error 1
ERROR: compilation failed for package 'acepack'

I found on the Internet a fix for R 1.8 which suggests to delete the  
-lfrtbegin library from /Applications/StartR.app/RAqua.app/Contents/etc  
but this path does not exists anymore on R 2.00.

How could I solve the problem.
Thank you in advance for the help.
Marco
 
-
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E317
Tel: +49.(0)6151.166802 Fax: +49.(0)6151.165326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Problems installing packages on MacOS with R 2.00

2004-11-15 Thread Marco Chiarandini
Dear Prof. Ripley,

 It is R 2.0.0!  Your problem is that you do not have g77 installed, or at
 least, not the same version as was used to compile your version of R.
 (Please do read the posting guide and tell us where you got R from -- I
 suspect you did not compile it yourself.)


I took R from http://cran.at.r-project.org/. True, I did not compiled
it: it was the R 2.0.0 (lastest version) bin package. However, I have
g77 version 3.4 (October 2003) installed on MacOS.


I deleted both -lfrtbegin and -lg2c from FLIBS in
/Library/Frameworks/R.framework/Resources/etc/Makeconf
and now Hmisc compiles fine.
I could not find a directory
/usr/local/lib/gcc/powerpc-apple-darwin6.8/
in my installation.


 I think this should be in the MacOS X FAQ, but unfortunately the version
 on CRAN linked from the sidebar and the main FAQ at

 http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html

 is for R 1.9.1, not 2.0.0.  Did your installation come with a current
 version?

 However, a further problem is that many packages which use Fortran code
 cannot be compiled for MacOS X as it does not have a shared Fortran
 run-time library.  So I suspect that if you do install g77-3.4.2 you will
 find that you cannot compile package acepack, and that is why no
 pre-compiled version of the package is available.



---
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E317
Tel: +49.(0)6151.166802 Fax: +49.(0)6151.165326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Problems in installing Rmpi library

2004-10-01 Thread Marco Chiarandini
dear all,

I am trying to install the Rmpi library on a cluster but I obtain the
following error, which concerns the dynamic libraries:

Rmpi version: 0.4-8
Rmpi is an interface (wrapper) to MPI APIs
with interactive R slave functionalities.
See `library (help=Rmpi)' for details.
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
/mypath/.R/library/Rmpi/libs/Rmpi.so:
/mypath/.R/library/Rmpi/libs/Rmpi.so: undefined
symbol: MPI_Finalize
Error in library(Rmpi) : .First.lib failed
Error in dyn.unload(x) : dynamic/shared library
/mypath/.R/library/Rmpi/libs/Rmpi.so was
not loaded

Is there anybody who can help me in finding a way to trun around the
problem.


Thank you for the help,


Marco


--
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E317
Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple comparisons in a non parametric case

2004-09-08 Thread Marco Chiarandini
Thanks Rolf and Thomas,


 It looks to me like what you are doing is trying to judge
 significance of differences by non-overlap of single-sample
 confidence intervals.  While this is appealing, it's not quite
 right.


Yes, this is what I am trying to do. Apparently, when the replicates are
the same for each experimental unit and the experiment is balanced the
CI should be the same for all sample-pairs, therefore it is somehow like
having single sample CI.


 I just looked into my copy of Applied Nonparametric Statistics
 (second ed.) by Wayne W. Daniel (Duxbury, 1990) but that
 only deals with the situation where there is a single replicate
 per block-treatment combination (whereas you have 10 reps)
 and block-treatment interaction is assumed to be non-existent.


The problems (or instances of problems) are my blocking factor. But this
factor has significant interaction in the ANOVA model.


 The method that Daniel prescribes in this simple setting seems to be
 no more than applying the Bonferroni method of multiple comparisons.
 (Daniel does not say; his book is very much a cook-book.)  So you
 might simply try Bonferroni --- i.e. do all k-choose-2 pairwise
 comparisons between treatments (using the appropriate 2 sample method
 for each comparison) doing each comparison at the alpha/k-choose-2
 significance level.  Where k = the number of treatments = 4 in your
 case.  This method is not going to be super-powerful but it is
 sometimes surprizing how well Bonferroni stacks up against more
 ``sophisticated'' methods.


I knew about Bonferroni. But I am confused. I have actually two
references: Conover Practical Nonparametric statistics (page 371) and
Sheskin Handbook and Nonparmetric statistical procedures (page
675). Both these books deal with multiple comparison when the Friedman
test would be appropriate. But the formula given are different and the
CI I obtain are also different.

Sheskin, citing various sources (among them Daniel 1990), uses a formula
with the normal distribution z and adjust the alfa value according to
Bonferroni (strangely no sample statistic appears in the formula).
Conover (which is also a good reference) uses a formula with Student't
distribution but does not adjust alfa either in the example he provides
where 4 treatments are pairwise compared.

The CI I obtain are much smaller if I use the Conover procedure than the
Sheskin's. And this happens in spite of the p-adjustment in Sheskin.
Smaller CI are for me nicer because I can distinguish better differences
But the a factor of 3 between them let me doubt I can really use
Conover.

Which is your opinion?


Thansk again for the help,

Ragards,

Marco




--
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E317
Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Multiple comparisons in a non parametric case

2004-09-07 Thread Marco Chiarandini
Dear all,

I am conducting a full factorial analysis. I have one factor consisting
in algorithms, which I consider my treatments, and another factor made
of the problems I want to solve. For each problem I obtain a response
variable which is stochastic. I replicate the measure of this response
value 10 times.

When I apply ANOVA the assumptions do not hold, hence I must rely on non
parametric tests.

By transforming the response data in ranks, the Friedman test tells me
that there is statistical significance in the difference of the sum of
ranks of at least one of the treatments.

I would like now to produce a plot for the multiple comparisons similar
to the Least Significant Difference or the Tukey's Honest Significant
Difference used in ANOVA. Since I am in the non parametric case I can
not use these methods.

Instead, I compare graphically individual treatments by plotting the sum
of ranks of each treatment togehter with the 95% confidence interval. To
compute the interval I use the Friedman test as suggested by Conover in
Practical Nonparametric statistics.

I obtain something like this:

Treat. A|-+-|
Treat. B  |-+-|
Treat. C   |-+-|
Treat. D   |-+-|

The intervals have all the same spread because the number of
replications was the same for all experimental units.


I would like to know if someone in the list had a similar experience and
if what I am doing is correct. In alternative also a reference to
another list which could better fit my request is welcome.


Thank you for the help,

Marco



--
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E317
Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] nonparametric two-way structure all-pairwise comparisons

2004-06-21 Thread Marco Chiarandini
Hello,

I am conducting a two-way analysis of variance. The ANOVA assumption
are not met, hence I need to use non-parametrical methods. In particular
I am interested in all-pairwise comparisons between the levels of one of
the two factors.

If I transform the data in ranks, can I reuse the TukeyHSD method to
produce confidence intervals? If this is not correct, is there any
method implemented in R to produce confidence intervals in the
non-parametrical context?


Thank you for the help!


Marco



--
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E317
Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Trellis plot in multiple display with grid

2004-03-21 Thread Marco Chiarandini
Dear all,

I would like to plot a multipanel display. Each plot should have the
curve over time of the solution produced by 10 different algorithms
(groups of data).

I handle this with:


xyplot(quality~time | inst, data=profiles, groups=alg,
   panel=panel.superpose,
   type=c(s),
   as.table=TRUE,
   scales=list(relation=free,rot=c(0,90),cex=0.8),
   layout=c(3,3),
   main=list(label=Run time profile,cex=1.3),
   xlab=list(label=Normalised time,cex=1.3),
   ylab=list(label=Number of colours,cex=1.3),
   par.strip.text=list(cex=0.9),
   key=list(columns=1,cex=1,space=right,
 text=list(levels(as.factor(profiles$alg))),
 #points=Rows(sps,1:9),
 lines=Rows(spl,1:9)
 )
   )



My problems come when I try to add a grid to each of these plots.
I call this:


xyplot(quality~time | inst, data=profiles, groups=alg,
   #panel=panel.superpose,

   panel=function(x,y)
   {
 panel.grid(h = -1, v = -1, lty = 2)
 panel.xyplot(x,y,type=c(s))
   },
   as.table=TRUE,
   scales=list(relation=free,rot=c(0,90),cex=0.8),
   layout=c(3,4),
   main=list(label=Run time profile,cex=1.3),
   xlab=list(label=Normalised time,cex=1.3),
   ylab=list(label=Number of colours,cex=1.3),
   par.strip.text=list(cex=0.9),
   key=list(columns=1,cex=1,corner=c(1,0),x=0.9,y=0.07,
 text=list(levels(as.factor(profiles$alg))),
 #points=Rows(sps,1:9),
 lines=Rows(spl,1:9)
 )
   )


but the result is that I am not anymore able to recognize the different
algorithms in each sinlge plot.

Is there anyone who can help me?


Thank you,


Marco Chiarandini


--
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Alexanderstrasse 10,
D-64283 Darmstadt - Germany, Office: S1/15 Raum 118
Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Trellis plot in multiple display with grid

2004-03-21 Thread Marco Chiarandini
Thank you a lot! It works exactly as I desired.

I dare to ask you another detail about Trellis multiple display plots.
I would like to plot vertical lines in correspondence of the confidence
intervals with the function below in order to make easier the visual
comparison.

Is this possible? I tried using the same logic proposed in the previous
answer but it does not work.


 Dotplot(as.factor(alg) ~ Cbind(y,lower,upper) | class,
 data=all,subset=ss,
   pch=3,method=bars,pch.bar=2,
 # panel=function(x,y,...) {
 #   panel.abline(v=y)
 #   panel.superpose(x,y,...)
 # },
  scales = list(cex=1,
 x=list(relation=free),
 y=list(alternating=c(1,1,1,1),
   labels=c(levels(all$alg)),
   at=c(1:nlevels(all$alg,
   main=list(cex=1.3,label=Multiple comparisons with Tukey's
confidence intervals),
   xlab=list(label=Percentage deviation from best
   results,cex=1.3,between.columns=5,distance=rep(2,60),size=3),
   ylab=,
   aspect=0.6,as.table=TRUE);




On Sun, 21 Mar 2004, Deepayan Sarkar wrote:

 On Sunday 21 March 2004 12:08, Marco Chiarandini wrote:
  Dear all,
 
  I would like to plot a multipanel display. Each plot should have the
  curve over time of the solution produced by 10 different algorithms
  (groups of data).
 
  I handle this with:
 
 
  xyplot(quality~time | inst, data=profiles, groups=alg,
 panel=panel.superpose,
 type=c(s),
 as.table=TRUE,
 scales=list(relation=free,rot=c(0,90),cex=0.8),
 layout=c(3,3),
 main=list(label=Run time profile,cex=1.3),
 xlab=list(label=Normalised time,cex=1.3),
 ylab=list(label=Number of colours,cex=1.3),
 par.strip.text=list(cex=0.9),
 key=list(columns=1,cex=1,space=right,
   text=list(levels(as.factor(profiles$alg))),
   #points=Rows(sps,1:9),
   lines=Rows(spl,1:9)
   )
 )
 
 
 
  My problems come when I try to add a grid to each of these plots.
  I call this:
 
 
  xyplot(quality~time | inst, data=profiles, groups=alg,
 #panel=panel.superpose,
 
 panel=function(x,y)
 {
   panel.grid(h = -1, v = -1, lty = 2)
   panel.xyplot(x,y,type=c(s))
 },

 Instead, try

 panel=function(x,y,...)
 {
   panel.grid(h = -1, v = -1, lty = 2)
   panel.superpose(x,y,...)
 },
 type = s,


 as.table=TRUE,
 scales=list(relation=free,rot=c(0,90),cex=0.8),
 layout=c(3,4),
 main=list(label=Run time profile,cex=1.3),
 xlab=list(label=Normalised time,cex=1.3),
 ylab=list(label=Number of colours,cex=1.3),
 par.strip.text=list(cex=0.9),
 key=list(columns=1,cex=1,corner=c(1,0),x=0.9,y=0.07,
   text=list(levels(as.factor(profiles$alg))),
   #points=Rows(sps,1:9),
   lines=Rows(spl,1:9)
   )
 )
 
 
  but the result is that I am not anymore able to recognize the
  different algorithms in each sinlge plot.
 
  Is there anyone who can help me?
 
 
  Thank you,
 
 
  Marco Chiarandini
 
 
  --
  Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
  Technische Universität Darmstadt, Alexanderstrasse 10,
  D-64283 Darmstadt - Germany, Office: S1/15 Raum 118
  Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
  email: [EMAIL PROTECTED]
  web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud
 
  __
  [EMAIL PROTECTED] mailing list
  https://www.stat.math.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
  http://www.R-project.org/posting-guide.html


--
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Alexanderstrasse 10,
D-64283 Darmstadt - Germany, Office: S1/15 Raum 118
Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Trellis plot in multiple display with grid

2004-03-21 Thread Marco Chiarandini

 This is from Hmisc, right ? I'm not too familiar with it. But I don't
 see the link with the previous example. What exactly is wrong with
 this ? Do you want to use a 'groups' argument ?


Yes, it is from Hmisc but it requires Lattice and it works with Trellis.

I would like that in each of the displays, which are plotted according to
class, some vertical lines appear. This vertical lines should be in
correspondence of y,lower,upper.

I don't know if I need to specifies groups. I tried, but it does not help.

I tried using the part that below is commented but I get an error
message concering missing groups...



   Dotplot(as.factor(alg) ~ Cbind(y,lower,upper) | class,
   data=all,subset=ss,
 pch=3,method=bars,pch.bar=2,
   # panel=function(x,y,...) {
   #   panel.abline(v=y)
   #   panel.superpose(x,y,...)
   # },
scales = list(cex=1,
   x=list(relation=free),
   y=list(alternating=c(1,1,1,1),
 labels=c(levels(all$alg)),
 at=c(1:nlevels(all$alg,
 main=list(cex=1.3,label=Multiple comparisons with Tukey's
  confidence intervals),
 xlab=list(label=Percentage deviation from best
 
  results,cex=1.3,between.columns=5,distance=rep(2,60),size=3),
  ylab=,
 aspect=0.6,as.table=TRUE);




--
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Alexanderstrasse 10,
D-64283 Darmstadt - Germany, Office: S1/15 Raum 118
Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html