Re: [Rd] bug in power.t.test( ) (PR#7245)
[EMAIL PROTECTED] wrote: > Full_Name: Mai Zhou > Version: 1.9.1 > OS: Win XP Professional > Submission from: (NULL) (12.222.227.93) > > > >>power.t.test(n=25, delta=0.1, sig.level=1.1, strict=TRUE, type="one.sample") > > > One-sample t test power calculation > > n = 25 > delta = 0.1 > sd = 1 > sig.level = 1.1 > power = 1.088311 > alternative = two.sided > > ### power can never be over one! Of course, sig.level should not take value > 1 > ### either. > ### Possible solution: A check in the input to truncate sig.level into [0, 1]?? Well, an error (or at least warning) message seems to be more appropriate rather than silently changing some values, e.g. somehwere at the top of the functions body: if(any(sig.level < 0 | sig.level > 1)) stop("sig.level must be in [0,1]") Uwe Ligges > __ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] bug in power.t.test( ) (PR#7245)
Full_Name: Mai Zhou Version: 1.9.1 OS: Win XP Professional Submission from: (NULL) (12.222.227.93) > power.t.test(n=25, delta=0.1, sig.level=1.1, strict=TRUE, type="one.sample") One-sample t test power calculation n = 25 delta = 0.1 sd = 1 sig.level = 1.1 power = 1.088311 alternative = two.sided ### power can never be over one! Of course, sig.level should not take value > 1 ### either. ### Possible solution: A check in the input to truncate sig.level into [0, 1]?? __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Cannot build cluster_1.9,6 under R 2.0.0 beta Sep 21
And another follow-up -- this may well be related to cluster as mgcv-1.1.2 builds fine. Dirk -- Those are my principles, and if you don't like them... well, I have others. -- Groucho Marx __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Cannot build cluster_1.9,6 under R 2.0.0 beta Sep 21
On Thu, Sep 23, 2004 at 07:58:58PM -0500, Dirk Eddelbuettel wrote: > Doing the normal build process [1] for a first time with a R 2.0.0 snapshot > -- the Sep 21 version I uploaded to Debian's 'experimental' section two days > ago, ended in failure. The package in question is cluster 1.9.6 which should > be 2.0.0-ready. > > The (partial) log follows: (See other mail for rest) Three more points: i) R 1.9.1 beta 20040921 works fine as packaged and installed into the chroot'ed build environment, and ii) The package stats, graphics and utils upon which cluster Depends: all load nicely in an interactive session. iii) The same error occurrs when I call 'R CMD INSTALL cluster-1.9.6' by hand. I'm still lost as to why I get Error in .find.package(package, lib.loc, verbose = verbose) : none of the packages were found Execution halted when building cluster. Dirk -- Those are my principles, and if you don't like them... well, I have others. -- Groucho Marx __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Cannot build cluster_1.9,6 under R 2.0.0 beta Sep 21
Doing the normal build process [1] for a first time with a R 2.0.0 snapshot -- the Sep 21 version I uploaded to Debian's 'experimental' section two days ago, ended in failure. The package in question is cluster 1.9.6 which should be 2.0.0-ready. The (partial) log follows: - [...] g77 -mieee-fp -fPIC -g -O2 -c twins.f -o twins.o gcc -shared -o cluster.so clara.o daisy.o dysta.o fanny.o meet.o mona.o pam.o spannel.o twins.o -L/usr/lib/gcc-lib/i486-linux/3.3.4 -L/usr/lib/gcc-lib/i486-linux/3.3.4/../../.. -lfrtbegin -lg2c -lm -lgcc_s -L/usr/lib/R/lib -lR make[1]: Leaving directory `/tmp/buildd/cluster-1.9.6/src' ** R ** data ** moving datasets to lazyload DB ** preparing package for lazy loading ** help >>> Building/Updating help pages for package 'cluster' Formats: text html latex example agnes texthtmllatex example agnes.object texthtmllatex agriculture texthtmllatex example animals texthtmllatex example bannerplottexthtmllatex clara texthtmllatex example clara.object texthtmllatex clusplot texthtmllatex clusplot.default texthtmllatex example clusplot.partitiontexthtmllatex example cluster-internal texthtmllatex daisy texthtmllatex example diana texthtmllatex example diana.object texthtmllatex example dissimilarity.object texthtmllatex ellipsoidhull texthtmllatex example fanny texthtmllatex example fanny.object texthtmllatex flowertexthtmllatex example lower.to.upper.tri.inds texthtmllatex example mona texthtmllatex example mona.object texthtmllatex pam texthtmllatex example pam.objecttexthtmllatex example partition.object texthtmllatex plot.agnestexthtmllatex example plot.dianatexthtmllatex example plot.mona texthtmllatex plot.partitiontexthtmllatex example pltreetexthtmllatex pltree.twins texthtmllatex example plutontexthtmllatex example predict.ellipsoid texthtmllatex print.agnes texthtmllatex print.clara texthtmllatex print.diana texthtmllatex print.dissimilarity texthtmllatex example print.fanny texthtmllatex print.monatexthtmllatex print.pam texthtmllatex ruspini texthtmllatex example silhouettetexthtmllatex example sizeDiss texthtmllatex example summary.agnes texthtmllatex example summary.clara texthtmllatex example summary.diana texthtmllatex summary.fanny texthtmllatex summary.mona texthtmllatex summary.pam texthtmllatex twins.object texthtmllatex volume.ellipsoid texthtmllatex example votes.repub texthtmllatex xclaratexthtmllatex Error in .find.package(package, lib.loc, verbose = verbose) : none of the packages were found Execution halted ERROR: installing package indices failed make: *** [R_any_arch] Error 1 pbuilder: Failed autobuilding of package -> Aborting with an error -> unmounting dev/pts filesystem -> unmounting proc filesystem -> cleaning the build env -> removing directory /var/local/cache/pbuilder/build//8487 and its subdirectories - The 'make' and 'pbuilder' messages come from the build environment. Any idea what is wrong here, and what I'd need to change? Dirk [1] This happens in a chroot(8) ennvironment, from a well-defined and very basic Debian base s
[Rd] algorithm reference for sample()
Hi, Don't know if it belongs to r-devel or r-help, but since I am planning to alter some of R's internal code I am sending it here. The existing implementation of the sample() function, when the optional 'prob' argument is given, is quite inefficient. The complexity is O(sampleSize * universeSize), see ProbSampleReplace() and ProbSampleNoReplace() in random.c. This makes the function impractical for the vector sizes I use. I want to re-code these functions and I "think" I can come up with a more efficient algorithm. However before I go and reinvent the wheel I wonder if there is a published description of an efficient sampling algorithm with user-specified probabilities? Thanks, Vadim [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] noncentrality paramter in power.anova.test (PR#7244)
[EMAIL PROTECTED] writes: > Full_Name: > Version: 1.9.0 > OS: Windows XP > Submission from: (NULL) (134.126.93.191) > > > I believe the noncentrality parameter, lambda, in power.anova.test is incorrect. > The noncentrality paramter is defined as lambda <- (groups - 1) * n * > (between.var/within.var). The n should not be there. The function pf defines the > noncentrality parameter as the sum of squares of the means. Therefore, the > noncentrality paramter, lambda, in power.anova.test should be lambda <- (groups > - 1) * (between.var/within.var). The following code shows the difference in > results. I've compared a few power computations using the new lambda to values > from a text on power. The new lambda produces more correct values for power. Correct by which measure? Surely not by consistency with power.t.test in the groups==2 case! I think you're forgetting that there is a scale factor of n needed to make the variance of the sample means comparable to the sample variance. The means referred to in the definition of ncp for pf are only indirectly related to the actual group means. > groups <- 3 > n <- 5 > between.var <- 10.295 > within.var <- 1 > sig.level <- 0.05 > > > #The first, incorrect lambda is used in power.anova.test > #incorrect labmda > lambda <- (groups - 1) * n * (between.var/within.var) > pf(qf(sig.level, groups - 1, (n - 1) * groups, lower = FALSE), > groups - 1, (n - 1) * groups, lambda, lower = FALSE) > > #This correct lambda should be used instead > lambda <- (groups - 1) * (between.var/within.var) > pf(qf(sig.level, groups - 1, (n - 1) * groups, lower = FALSE), > groups - 1, (n - 1) * groups, lambda, lower = FALSE) > > __ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Rgraphviz + graphviz 1.12.1 compilation error
Hi, I have Linux Fedora 32 bit with 512 RAM I would like to use Rgraphviz package.so, I did: $ [EMAIL PROTECTED] packages]# rpm -i graphviz-1.12-1.i386.rpm package graphviz-1.12-1 is already installed [EMAIL PROTECTED] packages]# R CMD INSTALL -l /usr/local/lib/R/library Rgraphviz_1.4.0.tar.gz - * Installing *source* package 'Rgraphviz' ... ** libs gcc -I/usr/local/lib/R/include `dotneato-config --cflags` -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -Wall -fPIC -g -O2 -c Rgraphviz.c -o Rgraphviz.o In file included from /usr/local/include/graphviz/render.h:45, from common.h:21, from Rgraphviz.c:1: /usr/local/include/graphviz/macros.h:34:1: warning: "NEW" redefined In file included from common.h:13, from Rgraphviz.c:1: /usr/local/lib/R/include/Rdefines.h:129:1: warning: this is the location of the previous definition Rgraphviz.c: In function `Rgraphviz_agopen': Rgraphviz.c:244: warning: implicit declaration of function `GD_gvc' Rgraphviz.c:244: error: invalid lvalue in assignment make: *** [Rgraphviz.o] Error 1 ERROR: compilation failed for package 'Rgraphviz' ** Removing '/usr/local/lib/R/library/Rgraphviz' - anyone has this before? thanks, Saurin __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] noncentrality paramter in power.anova.test (PR#7244)
Full_Name: Version: 1.9.0 OS: Windows XP Submission from: (NULL) (134.126.93.191) I believe the noncentrality parameter, lambda, in power.anova.test is incorrect. The noncentrality paramter is defined as lambda <- (groups - 1) * n * (between.var/within.var). The n should not be there. The function pf defines the noncentrality parameter as the sum of squares of the means. Therefore, the noncentrality paramter, lambda, in power.anova.test should be lambda <- (groups - 1) * (between.var/within.var). The following code shows the difference in results. I've compared a few power computations using the new lambda to values from a text on power. The new lambda produces more correct values for power. groups <- 3 n <- 5 between.var <- 10.295 within.var <- 1 sig.level <- 0.05 #The first, incorrect lambda is used in power.anova.test #incorrect labmda lambda <- (groups - 1) * n * (between.var/within.var) pf(qf(sig.level, groups - 1, (n - 1) * groups, lower = FALSE), groups - 1, (n - 1) * groups, lambda, lower = FALSE) #This correct lambda should be used instead lambda <- (groups - 1) * (between.var/within.var) pf(qf(sig.level, groups - 1, (n - 1) * groups, lower = FALSE), groups - 1, (n - 1) * groups, lambda, lower = FALSE) __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] browser() is called incidentally (?) somewhere from inside methods::as
Hi, Executing the following code causes the prompt to enter browser() mode. >dd<-as(Npatrick1,"list") Called from: as(Npatrick1, "list") Browse[1]> R : Copyright 2004, The R Foundation for Statistical Computing Version 2.0.0 beta (2004-09-20), ISBN 3-900051-07-0 Some addtitional info about Npatrick1 > is(Npatrick1) [1] "Massvectorlist" "Mlist" "List" "list" [5] "vector" /E Dipl. bio-chem. Witold Eryk Wolski @ MPI-Moleculare Genetic Ihnestrasse 63-73 14195 Berlin'v' tel: 0049-30-83875219/ \ mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Rgraphviz compilation error
On Wed, Sep 22, 2004 at 01:11:35PM -0700, Saurin Jani wrote: [...] > I have installed graphviz version: > graphviz-1.16-1.src.rpm installed already on system. [...] > $ R CMD INSTALL -l /usr/local/lib/R/library > Rgraphviz_1.4.0.tar.gz [...] > make: *** [Rgraphviz.o] Error 1 > ERROR: compilation failed for package 'Rgraphviz' > ** Removing '/usr/local/lib/R/library/Rgraphviz' > > > please let me know...if someone has same problem, RGraphviz 1.4.0 says this in its README: Installing Rgraphviz: The Rgraphviz package requires a bit of extra work beyond simply installing the package itself to run properly. The user must first have installed the GraphViz software provided by AT&T. For users of the release version of Rgraphviz from Bioconductor 1.3, this must be Graphviz version 1.10. For users of Rgraphviz for Bioconductor 1.4 (or the devel versions leading up to the 1.4 release) this must be Graphviz version 1.12. So you may have to back out graphviz-1.16. For what it's worth, RGraphviz-1.4.0 built on my Debian testing system (on which graphviz 1.12 is installed) as a script-generated Debian package which is available, along with over 400 other CRAN/BioC packages, as part of Quantian -- see http://dirk.eddelbuettel.com/quantian Dirk -- Those are my principles, and if you don't like them... well, I have others. -- Groucho Marx __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] attaching to position 1
> "PatBurns" == Patrick Burns <[EMAIL PROTECTED]> > on Wed, 22 Sep 2004 18:30:10 +0100 writes: PatBurns> If an attempt is made to attach to position 1, it PatBurns> appears to work (not even a warning) but in fact PatBurns> it doesn't work as many would expect. "search" PatBurns> thinks that it gets placed in position 2, but PatBurns> nothing is actually there (according to "ls"). PatBurns> This is guaranteed to be confusing (and annoying) PatBurns> to people who are used to attaching to position 1 PatBurns> in S-PLUS. yes; thanks for bringing this up! PatBurns> I'm not clear on all of the implications of PatBurns> changing this, but my first inclination would be PatBurns> to make it an error to attach to position 1. The PatBurns> help file says that you can't do it. and has done so for a long time AFAIR. PatBurns> At the very least there should be a warning . My PatBurns> guess is that it is rare for someone to attach to PatBurns> position 1 and not attempt to modify what is being PatBurns> attached. Hence (together with the arguments further above), I think an error would be more appropriate [if there's only a warning and the user's code continues on the wrong assumption, more problems lay ahead]. OTOH, in the current "beta" phase I can think of a case where an error would be too "hard": The worst I can see is an R script that has attach(*, pos=1) which doesn't attach at all {as you say, it *seems* to attach to position 2 but doesn't really provide the object}, but for some reason still continues to produce reasonable things. Hene, for 2.0.0 in "deep freeze", I'd propose to give a warning only. However, we wouldn't the database' to search()[2] "seemingly" only, and this could be a problem if a user's script does a detach(..) later. I.e., we should attach() to pos=2 *properly* (instead of "seemingly") only. At the latest for 2.1.0, we should rather make the warning an error. In any case, this looks like a very simple fix (to the C source); Martin Maechler >> attach('foo.RData') >> search() PatBurns> [1] ".GlobalEnv""file:foo.RData""package:methods" PatBurns> [4] "package:stats" "package:graphics" "package:grDevices" PatBurns> [7] "package:utils" "package:datasets" "Autoloads" PatBurns> [10] "package:base" >> ls(2) PatBurns> [1] "jj" >> jj PatBurns> [1] 1 2 3 4 5 6 7 8 9 >> detach() >> search() PatBurns> [1] ".GlobalEnv""package:methods" "package:stats" PatBurns> [4] "package:graphics" "package:grDevices" "package:utils" PatBurns> [7] "package:datasets" "Autoloads" "package:base" >> attach('foo.RData', pos=1) >> search() PatBurns> [1] ".GlobalEnv""file:foo.RData""package:methods" PatBurns> [4] "package:stats" "package:graphics" "package:grDevices" PatBurns> [7] "package:utils" "package:datasets" "Autoloads" PatBurns> [10] "package:base" >> ls(2) PatBurns> character(0) PatBurns> _ PatBurns> platform i386-pc-mingw32 PatBurns> arch i386 PatBurns> os mingw32 PatBurns> system i386, mingw32 PatBurns> status Under development (unstable) PatBurns> major2 PatBurns> minor0.0 PatBurns> year 2004 PatBurns> month09 PatBurns> day 17 PatBurns> language R __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel