[R] need suggestion about building formual
hi, I'm an newbie for R,I want do some fitting in R. I wander if it is possible to write a few of equations but only one formual when fitting Currently,My problem is,in R, is there methods combination a few equations into one formual? For example, y=f1(k); k=f2(t); t=f3(x); although it is certain that the can be equations turn into one formual as y~f(x),but write such a complexity string make me painful. I have searched the web and found out there were only examples with one formual.any suggestion? I hope that I have omit something. __ 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] gfortran Makefile for cygwin
Hi all, I'm porting a package that I've worked on for OS X to Cygwin/Windows. This package requires a Makefile. My question is, how can I find out (or what is), the link command? Here is the OS X Makefile: RLIB_LOC=${R_HOME} F90_FILES=\ class_data_frame.f90 \ class_old_dbest.f90 \ class_cm_data.f90 \ class_cm.f90 \ class_bgw.f90 \ class_cm_mle.f90 \ cme.f90 FORTRAN_FILES=\ dgletc.f \ dglfgb.f\ dglfg.f\ dmdc.f\ mecdf.f %.o: %.f90 gfortran -c -g $ %.o: %.f gfortran -c -g $ bpkg.so: $(F90_FILES:%.f90=%.o) $(FORTRAN_FILES:%.f=%.o) gcc -Wall -bundle -flat_namespace -undefined suppress -L/sw/lib -L/usr/local/lib -o $@ $^ \ -L$(RLIB_LOC)/lib -lR ###EOF The -L lib dirs are not correct. On a *nix platform I would do something like this sh -x R CMD SHLIB ... to get at the R internal link information but I can't get that to work on Cygwin. Regards, Joel -- Joel Bremson Graduate Student Institute for Transportation Studies - UC Davis http://etrans.blogspot.com [[alternative HTML version deleted]] __ 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] scatterplot3d + density() + polygon(color)
klebyn wrote: Hi R Users, How to use the function polygon() together with the package scatterplot3d? I am trying to color below of the curves defined for the function density(). I tried to use the site: R GRAPH GALLERY as tutorial. I tried to adapt the example of this page: [figure]: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=30 [code]: http://addictedtor.free.fr/graphiques/sources/source_30.R to my case but I do not obtain success. Somebody could give a tip to me, please? I am thankful anticipatedly. Cleber Borges #My code test ## library(scatterplot3d) x=c(0.4, -1.2, .8, -.7, 0) d1 = density(x[1],bw=1.2, from=-3.0, to=3.0 ) d2 = density(x[2],bw=0.8, from=-3.0, to=3.0 ) d3 = density(x[3],bw=0.6, from=-2.5, to=2.5 ) d4 = density(x[4],bw=0.5, from=-2.0, to=2.0 ) d5 = density(x[5],bw=0.3, from=-1.5, to=1.5 ) sx = c(d1$x,d2$x,d3$x,d4$x,d5$x) sy = c(d1$y,d2$y,d3$y,d4$y,d5$y) sz = c(rep(0.1,512),rep(0.2,512),rep(0.3,512),rep(0.4,512),rep(0.5,512)) scatterplot3d(x=sx,y=sz,z=sy,type='l') ## __ 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 Example: library(scatterplot3d) x - c(0.4, -1.2, .8, -.7, 0) d - vector(length = length(x), mode = list) d[[1]] - density(x[1], bw = 1.2, from = -3.0, to = 3.0) d[[2]] - density(x[2], bw = 0.8, from = -3.0, to = 3.0) d[[3]] - density(x[3], bw = 0.6, from = -2.5, to = 2.5) d[[4]] - density(x[4], bw = 0.5, from = -2.0, to = 2.0) d[[5]] - density(x[5], bw = 0.3, from = -1.5, to = 1.5) x - lapply(d, [[, x) y - lapply(d, [[, y) z - lapply(seq(0.1, 0.5, 0.1), rep, each = 512) sx - unlist(x) sy - unlist(y) sz - unlist(z) s3d - scatterplot3d(x = sx, y = sz, z = sy, type = n) for(i in rev(seq(along=d))){ s3d_coords - s3d$xyz.convert(x[[i]], z[[i]], y[[i]]) polygon(s3d_coords, col = i, border = black) } Uwe Ligges __ 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] gfortran Makefile for cygwin
Joel Bremson wrote: Hi all, I'm porting a package that I've worked on for OS X to Cygwin/Windows. Cygwin is not supported. Please use MinGW's compilers, the tools and import from MkRules, as the manuals indicate. See other packages' Makefile.win files as examples. Messages regarding development seem to be more appropriate for the R-devel list. [Please move it there for follow-ups.] Uwe Ligges This package requires a Makefile. My question is, how can I find out (or what is), the link command? Here is the OS X Makefile: RLIB_LOC=${R_HOME} F90_FILES=\ class_data_frame.f90 \ class_old_dbest.f90 \ class_cm_data.f90 \ class_cm.f90 \ class_bgw.f90 \ class_cm_mle.f90 \ cme.f90 FORTRAN_FILES=\ dgletc.f \ dglfgb.f\ dglfg.f\ dmdc.f\ mecdf.f %.o: %.f90 gfortran -c -g $ %.o: %.f gfortran -c -g $ bpkg.so: $(F90_FILES:%.f90=%.o) $(FORTRAN_FILES:%.f=%.o) gcc -Wall -bundle -flat_namespace -undefined suppress -L/sw/lib -L/usr/local/lib -o $@ $^ \ -L$(RLIB_LOC)/lib -lR ###EOF The -L lib dirs are not correct. On a *nix platform I would do something like this sh -x R CMD SHLIB ... to get at the R internal link information but I can't get that to work on Cygwin. Regards, Joel -- Joel Bremson Graduate Student Institute for Transportation Studies - UC Davis http://etrans.blogspot.com [[alternative HTML version deleted]] __ 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-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] Question on lm(): When does R-squared come out as NA?
I've not seen a reply to this, nor ever seen it. Please make a reproducible example available (do see the posting guide). On Sun, 25 Sep 2005, Ajay Narottam Shah wrote: I have a situation with a large dataset (3000+ observations), where I'm doing lags as regressors, where I get: Call: lm(formula = rj ~ rM + rM.1 + rM.2 + rM.3 + rM.4) Residuals: 1990-06-04 1994-11-14 1998-08-21 2002-03-13 2005-09-15 -5.64672 -0.59596 -0.041430.554128.18229 Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) -0.003297 0.017603 -0.1870.851 rM 0.845169 0.010522 80.322 2e-16 *** rM.1 0.116330 0.010692 10.880 2e-16 *** rM.2 0.002044 0.010686 0.1910.848 rM.3 0.013181 0.010692 1.2330.218 rM.4 0.009587 0.010525 0.9110.362 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.044 on 3532 degrees of freedom Multiple R-Squared:NA,Adjusted R-squared:NA F-statistic:NA on 5 and 3532 DF, p-value: NA rM.1, rM.2, etc. are lagged values of rM. The OLS seems fine in every respect, except that there is an NA as the multiple R-squared. I will be happy to give sample data to someone curious about what is going on. I wondered if this was a well-known pathology. The way I know it, if the data allows computation of (X'X)^{-1}, one can compute the R2. -- Ajay Shah Consultant [EMAIL PROTECTED] Department of Economic Affairs http://www.mayin.org/ajayshah Ministry of Finance, New Delhi __ 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 -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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] R CMD build produces tar error under FreeBSD 5.4
On Tue, 27 Sep 2005, Eric van Gyzen wrote: On Sun, Sep 25, 2005 at 12:07:02PM +0100, Prof Brian Ripley wrote: On Sun, 25 Sep 2005, Andrew Robinson wrote: Hi R-helpers, I am trying to build a package under FreeBSD 5.4-RELEASE #0 using R Version 2.1.1. I have constructed a package using package.skeleton(), when I try $ R CMD build foo * checking for file 'foo/DESCRIPTION' ... OK * preparing 'foo': * checking DESCRIPTION meta-information ... OK * cleaning src * removing junk files tar: Option -L is not permitted in mode -x Error: cannot open file 'foo/DESCRIPTION' for reading foo/DESCRIPTION exists and the permissions are correct. The same command works under Linux Fedora 2. The man pages on each OS imply that tar differs across the two platforms. Does anyone have any thoughts on a work-around? No, because R does not use tar -L (which is to do with tape lengths on GNU tar). It does use tar chf and tar xhf. The h modifier would appear to be applicable only to dumps, so at a wild guess the error message means -h is not permitted. Try replacing xhf by xf. FreeBSD = 5.3 uses bsdtar. Previous versions used GNU tar. In bsdtar, -h is a synonym for -L, and -L means: -L (c and r mode only) All symbolic links will be followed. Nor- mally, symbolic links are archived as such. With this option, the target of the link will be archived instead. The man page for bsdtar doesn't indicate an option to dereference symlinks during extraction. :( Thanks for the confirmation (which I had managed to find from http://www.freebsd.org/cgi/man.cgi?query=tarapropos=0sektion=0manpath=FreeBSD+5.4-RELEASE+and+Portsformat=html ). R does not need xh here, and I have changed it in 2.2.0-beta. I do suggest you submit a bug report on the incorrect error message, though, which should refer to the option used, not one that is not used. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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] scatterplot3d + density() + polygon(color)
UweL == Uwe Ligges [EMAIL PROTECTED] on Wed, 28 Sep 2005 08:58:16 +0200 writes: UweL klebyn wrote: Hi R Users, How to use the function polygon() together with the package scatterplot3d? I am trying to color below of the curves defined for the function density(). I tried to use the site: R GRAPH GALLERY as tutorial. I tried to adapt the example of this page: [figure]: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=30 [code]: http://addictedtor.free.fr/graphiques/sources/source_30.R to my case but I do not obtain success. Somebody could give a tip to me, please? I am thankful anticipatedly. Cleber Borges #My code test ## ... UweL Example: library(scatterplot3d) x - c(0.4, -1.2, .8, -.7, 0) d - vector(length = length(x), mode = list) d[[1]] - density(x[1], bw = 1.2, from = -3.0, to = 3.0) d[[2]] - density(x[2], bw = 0.8, from = -3.0, to = 3.0) d[[3]] - density(x[3], bw = 0.6, from = -2.5, to = 2.5) d[[4]] - density(x[4], bw = 0.5, from = -2.0, to = 2.0) d[[5]] - density(x[5], bw = 0.3, from = -1.5, to = 1.5) x - lapply(d, [[, x) y - lapply(d, [[, y) z - lapply(seq(0.1, 0.5, 0.1), rep, each = 512) sx - unlist(x) sy - unlist(y) sz - unlist(z) s3d - scatterplot3d(x = sx, y = sz, z = sy, type = n) for(i in rev(seq(along=d))){ s3d_coords - s3d$xyz.convert(x[[i]], z[[i]], y[[i]]) polygon(s3d_coords, col = i, border = black) } Very nice, Uwe! To make it perfect, you'd have to add s3d$box3d() at the end; otherwise some of the painted polygons hide lines of the cube box which should not be hidden. Martin Maechler __ 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] R2WinBUGS: Comparison to WinBUGS
Hi R-Help! I used R2WinBUGS and WinBUGS directly on the same model just to compare. It seems I am still making a mistake: after running the function bugs() I tried to plot the posteriors of the parameters by using read.bugs() to convert the output to an mcmc object and then plot.mcmc() to plot the densities. Using the same model, the same number of iterations, the same initial values and the same data I get completely different plots for the densities (e.g. the range of one parameter in R2WinBUGS is from 0 to 8 but in WinBUGS only from 1.5 to 3)??? That means my results are different, too. Also, on the plot it says N=345 which is not what I specified in the bugs() function (I specified 12000 iterations). Below I put some of the code I used (if that helps): parameters - c(tau,C0,st90,C0.pop,st90.pop,tau.cpop,tau.stpop,st90.pop80) inits - inits - function(){ list(tau = rep(1, 17),tau.cpop = 0.2, tau.stpop = 1) } mcmcA - bugs(dataA,inits,parameters,modelA,n.chains=3,debug=T,n.iter=12000,n.burnin=2001, bugs.directory=c:/Program Files/WinBUGS14,working.directory=C:/Documents and Settings/Daikon/Roche/R2WinBUGS Output,codaPkg=T) codaA1 - read.bugs(mcmcA[1]) plot(codaA1) THANKS A LOT!! -- Hadassa Brunschwig Birmannsgasse 10A CH-4055 Basel Switzerland Phone: +41 78 797 6065 Email: [EMAIL PROTECTED] __ 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] [Fwd: R2WinBUGS: Comparison to WinBUGS]
This is due to the following: In bugs(), the default for thinning is n.thin = max(1, floor(n.chains * (n.iter - n.burnin)/1000)) which is 29 for n.iter=12000 and n.burnin=2001 as in your example. Therefore, the number of iterations used for calculation of posterior values is (12000-2001)/29 = 344.7931 which corresponds to the number of iterations given in your plot. If you specify the thinning parameter directly in bugs() it should be fine. Sibylle Original Message Subject: [R] R2WinBUGS: Comparison to WinBUGS Date: Wed, 28 Sep 2005 03:55:08 -0400 From: Hadassa Brunschwig [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Hi R-Help! I used R2WinBUGS and WinBUGS directly on the same model just to compare. It seems I am still making a mistake: after running the function bugs() I tried to plot the posteriors of the parameters by using read.bugs() to convert the output to an mcmc object and then plot.mcmc() to plot the densities. Using the same model, the same number of iterations, the same initial values and the same data I get completely different plots for the densities (e.g. the range of one parameter in R2WinBUGS is from 0 to 8 but in WinBUGS only from 1.5 to 3)??? That means my results are different, too. Also, on the plot it says N=345 which is not what I specified in the bugs() function (I specified 12000 iterations). Below I put some of the code I used (if that helps): parameters - c(tau,C0,st90,C0.pop,st90.pop,tau.cpop,tau.stpop,st90.pop80) inits - inits - function(){ list(tau = rep(1, 17),tau.cpop = 0.2, tau.stpop = 1) } mcmcA - bugs(dataA,inits,parameters,modelA,n.chains=3,debug=T,n.iter=12000,n.burnin=2001, bugs.directory=c:/Program Files/WinBUGS14,working.directory=C:/Documents and Settings/Daikon/Roche/R2WinBUGS Output,codaPkg=T) codaA1 - read.bugs(mcmcA[1]) plot(codaA1) THANKS A LOT!! -- Dipl.-Stat. Sibylle Sturtz Mathematische Statistik und biometrische Anwendungen Fachbereich Statistik Universität Dortmund 44221 Dortmund Tel.: 0231/755 4391 FAX : 0231/755 5303 __ 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] scatterplot3d + density() + polygon(color)
Le 28.09.2005 09:45, Martin Maechler a écrit : UweL == Uwe Ligges [EMAIL PROTECTED] on Wed, 28 Sep 2005 08:58:16 +0200 writes: UweL klebyn wrote: Hi R Users, How to use the function polygon() together with the package scatterplot3d? I am trying to color below of the curves defined for the function density(). I tried to use the site: R GRAPH GALLERY as tutorial. I tried to adapt the example of this page: [figure]: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=30 [code]: http://addictedtor.free.fr/graphiques/sources/source_30.R to my case but I do not obtain success. Somebody could give a tip to me, please? I am thankful anticipatedly. Cleber Borges #My code test ## ... UweL Example: library(scatterplot3d) x - c(0.4, -1.2, .8, -.7, 0) d - vector(length = length(x), mode = list) d[[1]] - density(x[1], bw = 1.2, from = -3.0, to = 3.0) d[[2]] - density(x[2], bw = 0.8, from = -3.0, to = 3.0) d[[3]] - density(x[3], bw = 0.6, from = -2.5, to = 2.5) d[[4]] - density(x[4], bw = 0.5, from = -2.0, to = 2.0) d[[5]] - density(x[5], bw = 0.3, from = -1.5, to = 1.5) x - lapply(d, [[, x) y - lapply(d, [[, y) z - lapply(seq(0.1, 0.5, 0.1), rep, each = 512) sx - unlist(x) sy - unlist(y) sz - unlist(z) s3d - scatterplot3d(x = sx, y = sz, z = sy, type = n) for(i in rev(seq(along=d))){ s3d_coords - s3d$xyz.convert(x[[i]], z[[i]], y[[i]]) polygon(s3d_coords, col = i, border = black) } Very nice, Uwe! To make it perfect, you'd have to add s3d$box3d() at the end; otherwise some of the painted polygons hide lines of the cube box which should not be hidden. Martin Maechler Very nice indeed, may i suggest some changes in the lapply calls : x - lapply(d, function(dd){dd$x[c(1,1:512,512)]}) y - lapply(d, function(dd){c(0,dd$y,0)}) z - lapply(seq(0.1, 0.5, 0.1), rep, each = 514) some densities weren't 0 at the end of the interval, so the curves seemed rotated. especially the red one. Romain -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques ~ ~~ Romain FRANCOIS - http://addictedtor.free.fr ~~ Etudiant ISUP - CS3 - Industrie et Services ~~http://www.isup.cicrp.jussieu.fr/ ~~ Stagiaire INRIA Futurs - Equipe SELECT ~~ http://www.inria.fr/recherche/equipes/select.fr.html~~ ~ __ 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] Dummy quesion about environment
Thank you Peter, for the comprehensive explanation. The reason I asked Does 'search do it?' is that as I can run ls(env=environment(h)) I can run ls(env=environment(package:methods)) or ls(package:methods) which I can see by search. I thought maybe what I see by search is all the environments under .GobalEnv which I understan this is not what I see by search. Thanks Ron Peter Dalgaard [EMAIL PROTECTED] 09/27/05 11:49 PM Ron Ophir [EMAIL PROTECTED] writes: Hi, I'm trying to understand environment object in R. I used the example: f - function(x) { y - 10 g - function(x) x + y return(g) } h - f() h(3) then i saw that f return an environment h function(x) x + y environment: 01B28570 but I coudn't access to x and y object in that environment: I tried get(x,env=h) I tried h$y can I access y and x? Well, there are special issues with x above, but the basic thing is to take environment(h). Notice that h _is_ a function that _has_ an associated environment. get(y,env=environment(h)) [1] 10 As I said, x is stranger, which is because you used f() in the call: get(x,env=environment(h)) str(get(x,env=environment(h))) symbol a - get(x,env=environment(h)) missing(a) [1] TRUE evalq(x,environment(h)) Error in eval(expr, envir, enclos) : argument x is missing, with no default evalq(missing(x),environment(h)) [1] TRUE You'll get the point if you look long and hard enough... how can I see an environment tree? You can't. You can see the parent of an environment, the grandparent, etc., but there is no way to see which children a given environment has. oes search does it? Huh? Thanks, Ron __ 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 -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ 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] [Fwd: R2WinBUGS: Comparison to WinBUGS]
Thanks for the tip. That was already helpful. But I am still not satisfied with the results. I now really changed n.thin to the same I had in WinBUGS. It looks like the commands should now be the same. However, I still get differences of 0.6 in the means of interesting parameters which should not be. The plot as well looks completely different. While in WinBUGS I get an approximately Gaussian posterior, this is not the case in R2WinBUGS, it is rather skewed. Does anyone know where the problem could be? As getting a Gaussian posterior is crucial for my work, I dont really know which results i should rely on. Thanks a lot. -- Hadassa Brunschwig Birmannsgasse 10A CH-4055 Basel Switzerland Phone: +41 78 797 6065 Email: [EMAIL PROTECTED] Quoting Sibylle Sturtz [EMAIL PROTECTED]: This is due to the following: In bugs(), the default for thinning is n.thin = max(1, floor(n.chains * (n.iter - n.burnin)/1000)) which is 29 for n.iter=12000 and n.burnin=2001 as in your example. Therefore, the number of iterations used for calculation of posterior values is (12000-2001)/29 = 344.7931 which corresponds to the number of iterations given in your plot. If you specify the thinning parameter directly in bugs() it should be fine. Sibylle Original Message Subject: [R] R2WinBUGS: Comparison to WinBUGS Date: Wed, 28 Sep 2005 03:55:08 -0400 From: Hadassa Brunschwig [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Hi R-Help! I used R2WinBUGS and WinBUGS directly on the same model just to compare. It seems I am still making a mistake: after running the function bugs() I tried to plot the posteriors of the parameters by using read.bugs() to convert the output to an mcmc object and then plot.mcmc() to plot the densities. Using the same model, the same number of iterations, the same initial values and the same data I get completely different plots for the densities (e.g. the range of one parameter in R2WinBUGS is from 0 to 8 but in WinBUGS only from 1.5 to 3)??? That means my results are different, too. Also, on the plot it says N=345 which is not what I specified in the bugs() function (I specified 12000 iterations). Below I put some of the code I used (if that helps): parameters - c(tau,C0,st90,C0.pop,st90.pop,tau.cpop,tau.stpop,st90.pop80) inits - inits - function(){ list(tau = rep(1, 17),tau.cpop = 0.2, tau.stpop = 1) } mcmcA - bugs(dataA,inits,parameters,modelA,n.chains=3,debug=T,n.iter=12000,n.burnin=2001, bugs.directory=c:/Program Files/WinBUGS14,working.directory=C:/Documents and Settings/Daikon/Roche/R2WinBUGS Output,codaPkg=T) codaA1 - read.bugs(mcmcA[1]) plot(codaA1) THANKS A LOT!! -- Dipl.-Stat. Sibylle Sturtz Mathematische Statistik und biometrische Anwendungen Fachbereich Statistik Universität Dortmund 44221 Dortmund Tel.: 0231/755 4391 FAX : 0231/755 5303 __ 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] installation on mac os x
hello everybody I'm currently doing an internship where i need to build a pipeline between a database and R, programmed in python. For the interface between python and R i installed the RPY package. but i still can't make a connection with R because on the mac os x system i can't install R with a shared library. does anybody know how to solve this problem ? thanks in advance richard __ 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] Error in make check-all
Fernando Mayer [EMAIL PROTECTED] writes: Dear Prof. Ripley, that was exactly what i did. Should i login on the system as root, instead of login as user and became root via console? What should i do to have X11 usable? I don't actually think that this is the problem. You shouldn't generally trust me rather than Brian, but I'm sitting at a SUSE 9.3 system, and he's not... If I su - to root, I can happily run xterm etc. from the root shell with display on the console, and also run make check on the current r-devel. So go look for missing RPM packages. That said, it is not generally a good idea to build as root. I prefer to build things as myself and only do the final install step as root if necessary. -pd (PS: I had a powercut when I was either 99.99% or 100.01% done with writing this before. Apologies if it went out twice...) Thanks, Fernando Mayer. Prof Brian Ripley escreveu: This is what happens if you don't have a usable X11 display. Did you perhaps use a root account on a console owned by a normal user? On Tue, 27 Sep 2005, Fernando Mayer wrote: Dear R-users, i'm a very newbie in linux, but decided to build R from source. Following the R Installation and Administration manual, i did this: ./configure --enable-R-shlib # this option is here because i intend to build the GNOME console after... make make check no problems in make check, but: make check-devel #and also make check-all indicated some WARNINGs in the log file: /usr/local/R-2.1.1/tests/tcltk.Rcheck/00check.Rcheck Right below is the content of this log file (I translated some words): [start log file] * using log directory '/usr/local/R-2.1.1/tests/tcltk.Rcheck' * using R version 2.1.1, 2005-06-20 * looks like 'tcltk' is a base package * skipping installation test * checking package directory ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking DESCRIPTION meta-information ... OK * checking package dependencies ... OK * checking index information ... OK * checking package subdirectories ... OK * checking S3 generic/method consistency ... WARNING Erro: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution See section 'Generic functions and methods' of the 'Writing R Extensions' manual. * checking replacement functions ... WARNING Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution In R, the argument of a replacement function which corresponds to the right hand side must be named 'value'. * checking foreign function calls ... WARNING Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution See section 'System and foreign language interfaces' of the 'Writing R Extensions' manual. * checking Rd files ... OK * checking for missing documentation entries ... WARNING Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution All user-level objects in a package should have documentation entries. See chapter 'Writing R documentation files' in manual 'Writing R Extensions'. * checking for code/documentation mismatches ... WARNING Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution * checking Rd \usage sections ... OK * checking DVI version of manual ... OK [end log file] The problem is in the tcltk package. I have searched in the archives, but didin't find anything similar to this problem (maybe there is, but i was not able to identify it). I really don't know what all the warnings means. What i need to know is what am i missing, and if there
Re: [R] anova on binomial LMER objects
Hi Patrick thanks for your advice. I have now tried glmmPQL, and it worked fine - I'm getting consistent results between plots and models fitted by glmmPQL. Plus it allows predict() and resid() which is another advantage over lmer at present. quick question though: why does one need to use PQL for binomial models? Is there a good reference for this? A few of my colleagues have also had similar problems, so I'm copying this message on to R-help as it might be useful there. Many thanks Robert Patrick A. Jansen wrote: Hi dr Bacghi, I ran into exactly the same problem with lmer models that had an rbind() response variable, as you posted to the R-list. The sums of squares produced by anova() seem wrong. They are almost identical to the mean squares, and hence F-values approach 1. Since you need PQL for binomial models anyway, you might want to use GlmmPQL instead. Seems to work fine with anova(). Best regards, Patrick Jansen *dr Patrick A. Jansen* University of Groningen Community and Conservation Ecology group E [EMAIL PROTECTED] W _www.rug.nl/fwn/onderzoek/programmas/biologie/cocon_ http://www.rug.nl/fwn/onderzoek/programmas/biologie/cocon c/o: Instituto Smithsonian de Investigaciones Tropicales Att. Patrick A. Jansen – Gamboa Apartado 0843-03092, Balboa, Ancón, Panamá, República de Panamá or: Smithsonian Tropical Research Insititute Att: Patrick A. Jansen – Gamboa Unit 0948, APO AA, 34002-0948, U.S.A. T +507-212-8904 (office) / +507-6516-2008 (cell) __ 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] anova on binomial LMER objects
On Wed, 28 Sep 2005, Robert Bagchi wrote: Hi Patrick thanks for your advice. I have now tried glmmPQL, and it worked fine - I'm getting consistent results between plots and models fitted by glmmPQL. Plus it allows predict() and resid() which is another advantage over lmer at present. quick question though: why does one need to use PQL for binomial models? Is there a good reference for this? Yes, the book which glmmPQL supports and the posting quide asks you to consult. A few of my colleagues have also had similar problems, so I'm copying this message on to R-help as it might be useful there. Many thanks Robert Patrick A. Jansen wrote: Hi dr Bacghi, I ran into exactly the same problem with lmer models that had an rbind() response variable, as you posted to the R-list. The sums of squares produced by anova() seem wrong. They are almost identical to the mean squares, and hence F-values approach 1. Since you need PQL for binomial models anyway, you might want to use GlmmPQL instead. Seems to work fine with anova(). Best regards, Patrick Jansen *dr Patrick A. Jansen* University of Groningen Community and Conservation Ecology group E [EMAIL PROTECTED] W _www.rug.nl/fwn/onderzoek/programmas/biologie/cocon_ http://www.rug.nl/fwn/onderzoek/programmas/biologie/cocon c/o: Instituto Smithsonian de Investigaciones Tropicales Att. Patrick A. Jansen Gamboa Apartado 0843-03092, Balboa, Ancón, Panamá, República de Panamá or: Smithsonian Tropical Research Insititute Att: Patrick A. Jansen Gamboa Unit 0948, APO AA, 34002-0948, U.S.A. T +507-212-8904 (office) / +507-6516-2008 (cell) __ 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 -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595__ 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] p-level in packages mgcv and gam
I only got one reply to my message: No, this won't work. The problem is the usual one with model selection: the p-value is calculated as if the df had been fixed, when really it was estimated. It is likely to be quite hard to get an honest p-value out of something that does adaptive smoothing. -thomas I do not understand this: it seems that a lot of people chose df=4 for no particular reason, but p-levels are correct. If instead I choose df=8 because a previous model has estimated this to be an optimal df, P-levels are no good because df are estimated? Furthermore, shouldn't packages gam and mgcv give similar results when the same data and df are used? I tried this: library(gam) data(kyphosis) kyp1 - gam(Kyphosis ~ s(Age, 4), family=binomial, data=kyphosis) kyp2 - gam(Kyphosis ~ s(Number, 4), family=binomial, data=kyphosis) kyp3 - gam(Kyphosis ~ s(Start, 4), family=binomial, data=kyphosis) anova.gam(kyp1) anova.gam(kyp2) anova.gam(kyp3) detach(package:gam) library(mgcv) kyp4 - gam(Kyphosis ~ s(Age, k=4, fx=T), family=binomial, data=kyphosis) kyp5 - gam(Kyphosis ~ s(Number, k=4, fx=T), family=binomial, data=kyphosis) kyp6 - gam(Kyphosis ~ s(Start, k=4, fx=T), family=binomial, data=kyphosis) anova.gam(kyp4) anova.gam(kyp5) anova.gam(kyp6) P levels for these models, by pair kyp1 vs kyp4: p= 0.083 and 0.068 respectively (not too bad) kyp2 vs kyp5: p= 0.445 and 0.03 (wow!) kyp3 vs kyp6: p= 0.053 and 0.008 (wow again) Also if you plot all these you find that the mgcv plots are smoother than the gam plots, even the same df are used all the time. I am really confused now! Denis Début du message réexpédié : De : Denis Chabot [EMAIL PROTECTED] Date : 26 septembre 2005 12:25:04 HAE À : r-help@stat.math.ethz.ch Objet : p-level in packages mgcv and gam Hi, I am fairly new to GAM and started using package mgcv. I like the fact that optimal smoothing is automatically used (i.e. df are not determined a priori but calculated by the gam procedure). But the mgcv manual warns that p-level for the smooth can be underestimated when df are estimated by the model. Most of the time my p-levels are so small that even doubling them would not result in a value close to the P=0.05 threshold, but I have one case with P=0.033. I thought, probably naively, that running a second model with fixed df, using the value of df found in the first model. I could not achieve this with mgcv: its gam function does not seem to accept fractional values of df (in my case 8.377). So I used the gam package and fixed df to 8.377. The P-value I obtained was slightly larger than with mgcv (0.03655 instead of 0.03328), but it is still 0.05. Was this a correct way to get around the underestimated P-level? Furthermore, although the gam.check function of the mgcv package suggests to me that the gaussian family (and identity link) are adequate for my data, I must say the instructions in R help for family and in Hastie, T. and Tibshirani, R. (1990) Generalized Additive Models are too technical for me. If someone knows a reference that explains how to choose model and link, i.e. what tests to run on your data before choosing, I would really appreciate it. Thanks in advance, Denis Chabot __ 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] Question on lm(): When does R-squared come out as NA?
On Wed, Sep 28, 2005 at 08:23:59AM +0100, Prof Brian Ripley wrote: I've not seen a reply to this, nor ever seen it. Please make a reproducible example available (do see the posting guide). It was a mistake on my part. Just in case others are able to recognise the situation, what was going on was that all the objects being used in the lm() call were zoo objects. It is a mystery to me as to why everything should work correctly but the R2 should break, but that happened. I found that when I switched to coredata(z) all was well. Gabor reminded me that I should really be using his dyn package so as to avoid such situations. Sorry for the false alarm, -ans. lm(formula = rj ~ rM + rM.1 + rM.2 + rM.3 + rM.4) Residuals: 1990-06-04 1994-11-14 1998-08-21 2002-03-13 2005-09-15 -5.64672 -0.59596 -0.041430.554128.18229 Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) -0.003297 0.017603 -0.1870.851 rM 0.845169 0.010522 80.322 2e-16 *** rM.1 0.116330 0.010692 10.880 2e-16 *** rM.2 0.002044 0.010686 0.1910.848 rM.3 0.013181 0.010692 1.2330.218 rM.4 0.009587 0.010525 0.9110.362 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.044 on 3532 degrees of freedom Multiple R-Squared:NA, Adjusted R-squared:NA F-statistic:NA on 5 and 3532 DF, p-value: NA rM.1, rM.2, etc. are lagged values of rM. The OLS seems fine in every respect, except that there is an NA as the multiple R-squared. I will be happy to give sample data to someone curious about what is going on. I wondered if this was a well-known pathology. The way I know it, if the data allows computation of (X'X)^{-1}, one can compute the R2. -- Ajay Shah Consultant [EMAIL PROTECTED] Department of Economic Affairs http://www.mayin.org/ajayshah Ministry of Finance, New Delhi __ 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] boxplot and xlim confusion?
I have some code as shown below. Basically, I would like three boxplots to be set next to each other with no ylabels on the two inner plots, and I want the same x axis range on all three. However, it seems like boxplot does not respect the xlim setting. I've tried the various ways I thought would work (par, boxplot(...xlim=)) but none of them seem to work. I then tried plot.window, that did not work. I also have another curious question for you. With the code below I tried to call plot.new and then plot.window before each new plot. What happens then is that the first figure goes on one page whereas the two others get put on the next page with a nice big gap in the middle. Does any of you have an explanation for that? names - c( LSU, stop, LSU, start, SSU, stop, SSU, start, TSU, stop, TSU, start) elsustop - read.table(28s.euk.accuracy.stop.dev) [skipped lots of read.table, which just reads files with one number on each line] par(mfcol=c(1,3)) par(mai = c(0,0,0.5,0.2), omi = c(1,1,1,1)) xaxis = c(-6000,1000) yaxis = c(0,7) #plot.new() #plot.window(xlim=xaxis, ylim=yaxis) boxplot(alsustop$V1 ,alsustart$V1 ,assustop$V1 ,alsustart$V1 ,atsustop$V1 ,atsustart$V1 ,names=names,col=c(lightblue,orange,lightblue,orange,lightblue,orange) ,horizontal = TRUE, main=ARC, xaxs = i, las=1) #plot.new() #plot.window(xlim=xaxis, ylim=yaxis) boxplot(blsustop$V1 ,blsustart$V1 ,bssustop$V1 ,blsustart$V1 ,btsustop$V1 ,btsustart$V1 ,col=c(lightblue,orange,lightblue,orange,lightblue,orange) ,horizontal = TRUE, main=BAC, xaxs = i) #plot.new() #plot.window(xlim=xaxis, ylim=yaxis) boxplot(elsustop$V1 ,elsustart$V1 ,essustop$V1 ,elsustart$V1 ,etsustop$V1 ,etsustart$V1 ,col=c(lightblue,orange,lightblue,orange,lightblue,orange) ,horizontal = TRUE, main=EUK, xaxs = i) Karin (sorry if you're getting sick of me..:)) -- Karin Lagesen, PhD student [EMAIL PROTECTED] http://www.cmbn.no/rognes/ __ 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] Random Forest with R
Hi, what is the name of the package that provides Random Forest with R. Sincerely Louis Ferré http://www.univ-tlse2.fr/grimm/smash/ferre/index.html Equipe GRIMM-2254 Département de Math-Info 5 allées Antonio Machado 31058 Toulouse Cedex Tel: 0561504608 0561503982 [[alternative HTML version deleted]] __ 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] multidimensional integration
dear all, i have the following problem: i want to integrate a two-dimensional function. unfortunately R crashes when i try to use adapt() and i get a nice windows message with some hex-code. do anybody of you knows how to avoid this or knows another more stable function than adapt() thanks a lot marcel __ 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] confidence variability bands for kernel estimators
I'm using nonparametric regression (packeges ksmooth and ks). My question: is there any way to compute confidence bands (or variability bands) with R. Confidence bands for functions are intervals [CLO(x);CUP(x)] such that with probability 1-alpha the true curve is covered by the band [CLO(x);CUP(x)]. Thanks very much for any help you can offer. Michael Gälger __ 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] [R-pkgs] package 'ltm' -- version: 0.3-0
Dear R users, I'd like to announce the new version of the package ltm (available from CRAN), for fitting Latent Trait Models (including the Rasch and two-parameter logistic models) under the Item Response Theory approach. Three main extra features have been added: (i) now both ltm() and rasch() permit general fixed-value constraints (e.g., useful for scaling purposes), (ii) there is the option to report the estimated parameters under the usual IRT parameterization, and (iii) both plot.ltm() and plot.rasch() are now more flexible. For info about other new features check the help and CHANGES files. Future plans include development of functions for fitting the three-parameter logistic and the graded response models. Any kind of feedback (questions, suggestions, bug-reports, etc.) is more than welcome. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://www.med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ R-packages mailing list [EMAIL PROTECTED] https://stat.ethz.ch/mailman/listinfo/r-packages __ 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] installation on mac os x
On 28 Sep 2005, [EMAIL PROTECTED] wrote: hello everybody I'm currently doing an internship where i need to build a pipeline between a database and R, programmed in python. For the interface between python and R i installed the RPY package. but i still can't make a connection with R because on the mac os x system i can't install R with a shared library. does anybody know how to solve this problem ? I think you will need to build R from source. The r-sig-mac email list would be a better place for this type of question. + seth __ 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] Random Forest with R
Have a look at http://cran.r-project.org/search.html or http://cran.at.r-project.org/src/contrib/PACKAGES.html -- randomForest Best, Matthias Hi, what is the name of the package that provides Random Forest with R. Sincerely Louis Ferré http://www.univ-tlse2.fr/grimm/smash/ferre/index.html Equipe GRIMM-2254 Département de Math-Info 5 allées Antonio Machado 31058 Toulouse Cedex Tel: 0561504608 0561503982 [[alternative HTML version deleted]] __ 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] Random Forest with R
Louis Ferre wrote: Hi, what is the name of the package that provides Random Forest with R. Really, what about looking yourself on CRAN or just googling for it? Most surprisingly the name of the package is randomForest. Uwe Ligges Sincerely Louis Ferré http://www.univ-tlse2.fr/grimm/smash/ferre/index.html Equipe GRIMM-2254 Département de Math-Info 5 allées Antonio Machado 31058 Toulouse Cedex Tel: 0561504608 0561503982 [[alternative HTML version deleted]] __ 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-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] Install and load packages
In Rgui 2.1.1 patched, the fourth drop-down menu after File, Edit and Misc is Packages. The last item on that menu is Install package(s) from local zip files Alternatively, RSiteSearch(install from a local zip file) produced 172 hits, some of which described other ways to do this. spencer graves Caio Lucidius Naberezny Azevedo wrote: Dear R-users, I would like to know what are the commands to install (from a local zip file) a package and then to load it. Thaks all, Bests, Caio Perco a consciencia, mas não importa, encontro a maior serenidade na alucinaçao. É curioso como não sei dizer quem sou. Quer dizer, sei-o bem, mas não posso dizer. Sobretudo tenho medo de dizer, porque no momento em que tento falar, não só não exprimo o que sinto como o que sinto se transforma lentamente no que eu digo. - Perto do coraçao selvagem, Clarice Lispector Quando você não conseguir olhar dentro da alma de alguém, se afaste. Vá embora e depois de um tempo volte. - Boris Pasternak /##\ * Caio Lucidius Naberezny Azevedo * Estudante de Doutorado - IME-USP *** *** Orientador : Prof. Dr. Dalton Andrade *** Área de Pesquisa : Modelos de Resposta ao Item *** \##/ - [[alternative HTML version deleted]] __ 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 -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com http://www.pdf.com Tel: 408-938-4420 Fax: 408-280-7915 __ 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] Random Forest with R
It's randomForest. Searching (simple text find) on the packages web page of CRAN using either random or forest would find you this. Hope this helps, Matt Wiener -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Louis Ferre Sent: Tuesday, September 27, 2005 8:45 AM To: r-help@stat.math.ethz.ch Subject: [R] Random Forest with R Hi, what is the name of the package that provides Random Forest with R. Sincerely Louis Ferré http://www.univ-tlse2.fr/grimm/smash/ferre/index.html Equipe GRIMM-2254 Département de Math-Info 5 allées Antonio Machado 31058 Toulouse Cedex Tel: 0561504608 0561503982 [[alternative HTML version deleted]] __ 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] Access to particular predict value
Hi everybody: I just generate interpolation maps with differents methods, like IDW and kriging, and now i want to compare the predict values versus real, and i don't who is the commant to do it. I want for example, if I pass from console the coordinates of a place, return me the predict value. Could anybody tell me how should do?. Thanks in advance -- Antoni Viúdez Mora Dept. Dinámica de Contaminantes Fundación CEAM Paterna (Valencia)-Spain tel: 961318190. ext: 216 e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] __ 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] graphics guide?
At the R website, CRAN, in the Manuals section, you can download the document titled An Introduction to R, which contains a substantial section on the basics of R graphics. -Don At 3:27 PM +0200 9/27/05, Karin Lagesen wrote: I am trying to create some graphs with R and it seems to be able to do what I need. However, I have so far not been able to find any sort of explanation of how the graphics system works. I am for instance trying to create a multiple figure, and I seem to have to call plot.new() before every new plot command, I have however not found any explanation of what this actually does. ?plot.new does give an explanation, but it is explained in R, so to speak. Where do I find out what for instance a graphics frame is? Thanks, Karin -- Karin Lagesen, PhD student [EMAIL PROTECTED] http://www.cmbn.no/rognes/ __ 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 -- -- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA __ 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] confidence variability bands for kernel estimators
The `sm' package has functionality to produce pointwise band. The `locfit' package can produce simultaneous band. Both are support software for books, where you'll find more detail. Andy From: Michael Gälger I'm using nonparametric regression (packeges ksmooth and ks). My question: is there any way to compute confidence bands (or variability bands) with R. Confidence bands for functions are intervals [CLO(x);CUP(x)] such that with probability 1-alpha the true curve is covered by the band [CLO(x);CUP(x)]. Thanks very much for any help you can offer. Michael Gälger __ 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-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] Errors in odbcConnectExcel()
Dear R-help I would like to read Excel Spreadsheets using odbcConnectExcel() in RODBC, but data in the first row can not be read. For example, I tried to read Excel file 'Book1.xls' in the current Work Directory with the following data (Range(A1:B5) in Excel), 1 19 2 27 3 61 4 76 5 98 My commands and the result are as follows. library(RODBC) Book1 - odbcConnectExcel(Book1.xls) X - sqlQuery(Book1, select * from [Sheet1$]) X F1 F2 1 2 27 2 3 61 3 4 76 4 5 98 You can easily see that first line has gone. I also changed range to Range(A2:B6) in Excel, but the result did not change. What is the problem about my procedure? OS:Windows XP R :Version 2.1.1 Sincerely yours. Satoshi [EMAIL PROTECTED] -- Know more about Breast Cancer __ 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] Errors in odbcConnectExcel()
This is entirely a function of the database format the ODBC Excel driver expects. It is *not* an error in odbcConnectExcel as your subject accuses. To use a spreadsheet as a database you need to have column names. On Thu, 29 Sep 2005, [ISO-2022-JP] ÅÄÃæ Áï wrote: Dear R-help I would like to read Excel Spreadsheets using odbcConnectExcel() in RODBC, but data in the first row can not be read. For example, I tried to read Excel file 'Book1.xls' in the current Work Directory with the following data (Range(A1:B5) in Excel), 1 19 2 27 3 61 4 76 5 98 My commands and the result are as follows. library(RODBC) Book1 - odbcConnectExcel(Book1.xls) X - sqlQuery(Book1, select * from [Sheet1$]) X F1 F2 1 2 27 2 3 61 3 4 76 4 5 98 You can easily see that first line has gone. I also changed range to Range(A2:B6) in Excel, but the result did not change. What is the problem about my procedure? OS:Windows XP R :Version 2.1.1 Sincerely yours. Satoshi [EMAIL PROTECTED] -- Know more about Breast Cancer __ 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 -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595__ 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] p-level in packages mgcv and gam
Hi Yves, Le 05-09-28 à 11:05, Yves Magliulo a écrit : hi, i'll try to help you, i send a mail about this subject last week... and i did not have any response... Sorry, I did not see your message last week. I'm using gam from package mgcv. 1) How to interpret the significance of smooth terms is hard for me to understand perfectly : using UBRE, you fix df. p-value are estimated by chi-sq distribution using GCV, the best df are estimated by GAM. (that's what i want) and p-values are estimated by an F distribution But in that case they said use at your own risk in ?summary.gam so you can also look at the chi.sq : but i don't know how to choose a criterion like for p-values... for me, chi.sq show the best predictor in a model, but it's hard to reject one with it. so as far as i m concerned, i use GCV methods, and fix a 5% on the null hypothesis (pvalue) to select significant predictor. after, i look at my smooth, and if the parametrization look fine to me, i validate. generaly, for p-values smaller than 0.001, you can be confident. over 0.001, you have to check. I think I follow you, but how do you validate? My fit goes very nicely in the middle of the data points and appears fine. In most cases p is way smaller than 0.001. I have one case that is bimodal in shape and more noisy, and p is only 0.03. How do I validate it, how do I check? 2) for difference between package gam and mgcv, i sent a mail about this one year ago, here's the response : - package gam is based very closely on the GAM approach presented in Hastie and Tibshirani's Generalized Additive Models book. Estimation is by back-fitting and model selection is based on step-wise regression methods based on approximate distributional results. A particular strength of this approach is that local regression smoothers (`lo()' terms) can be included in GAM models. - gam in package mgcv represents GAMs using penalized regression splines. Estimation is by direct penalized likelihood maximization with integrated smoothness estimation via GCV or related criteria (there is also an alternative `gamm' function based on a mixed model approach). Strengths of the this approach are that s() terms can be functions of more than one variable and that tensor product smooths are available via te() terms - these are useful when different degrees of smoothness are appropriate relative to different arguments of a smooth. (...) Basically, if you want integrated smoothness selection, an underlying parametric representation, or want smooth interactions in your models then mgcv is probably worth a try (but I would say that). If you want to use local regression smoothers and/or prefer the stepwise selection approach then package gam is for you. It is hard to evaluate the explanations based on the algorithm used to fit the data, but it seems to me that the answer, in terms of significance of the smooth, should be at least very similar. Otherwise, what do you do when an author cites one package? You wonder if the fit would have been significant using the other package? i think the difference of p-values between :gam and :mgcv, is because you don't have same number of step iteration. mgcv : gam choose the number of step and with gam : gam you have to choose it.. hope it helps and someone gives us more details... Yves Again, I can see that the p-values could differ a bit considering the differences between the 2 packages. But when the differences are huge and result in contradictory conclusions, I have a problem. Like you I hope more help is forthcoming. Denis __ 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] p-level in packages mgcv and gam
On Wed, 28 Sep 2005, Denis Chabot wrote: I only got one reply to my message: No, this won't work. The problem is the usual one with model selection: the p-value is calculated as if the df had been fixed, when really it was estimated. It is likely to be quite hard to get an honest p-value out of something that does adaptive smoothing. -thomas I do not understand this: it seems that a lot of people chose df=4 for no particular reason, but p-levels are correct. If instead I choose df=8 because a previous model has estimated this to be an optimal df, P-levels are no good because df are estimated? Yes. I know this sounds strange initially, but it really does make sense if you think about it carefully. Suppose that Alice and Bob are kyphosis researchers, and that Alice always chooses 4df for smoothing Age. We would all agree that her p-values are correct [in fact we wouldn't, but that is a separate issue] Bob, on the other hand, chooses the amount of smoothing depending on the data. When a 4 df smooth fits best he ends up with the same model as Alice and the same p-value. When some other df fits best he ends up with a different model and a *smaller* p-value than Alice. In particular, this is still true under the null hypothesis that Age has no effect [If Alice and Bob are interested in p-values, the null hypothesis must be plausible.] If Bob's p-values are always less than or equal to Alice's p-values under the null hypothesis, and Alice's p-values are less than 0.05 5% of the time, then Bob's p-values are less than 0.05 more than 5% of the time. -thomas Furthermore, shouldn't packages gam and mgcv give similar results when the same data and df are used? I tried this: library(gam) data(kyphosis) kyp1 - gam(Kyphosis ~ s(Age, 4), family=binomial, data=kyphosis) kyp2 - gam(Kyphosis ~ s(Number, 4), family=binomial, data=kyphosis) kyp3 - gam(Kyphosis ~ s(Start, 4), family=binomial, data=kyphosis) anova.gam(kyp1) anova.gam(kyp2) anova.gam(kyp3) detach(package:gam) library(mgcv) kyp4 - gam(Kyphosis ~ s(Age, k=4, fx=T), family=binomial, data=kyphosis) kyp5 - gam(Kyphosis ~ s(Number, k=4, fx=T), family=binomial, data=kyphosis) kyp6 - gam(Kyphosis ~ s(Start, k=4, fx=T), family=binomial, data=kyphosis) anova.gam(kyp4) anova.gam(kyp5) anova.gam(kyp6) P levels for these models, by pair kyp1 vs kyp4: p= 0.083 and 0.068 respectively (not too bad) kyp2 vs kyp5: p= 0.445 and 0.03 (wow!) kyp3 vs kyp6: p= 0.053 and 0.008 (wow again) Also if you plot all these you find that the mgcv plots are smoother than the gam plots, even the same df are used all the time. I am really confused now! Denis Début du message réexpédié : De : Denis Chabot [EMAIL PROTECTED] Date : 26 septembre 2005 12:25:04 HAE À : r-help@stat.math.ethz.ch Objet : p-level in packages mgcv and gam Hi, I am fairly new to GAM and started using package mgcv. I like the fact that optimal smoothing is automatically used (i.e. df are not determined a priori but calculated by the gam procedure). But the mgcv manual warns that p-level for the smooth can be underestimated when df are estimated by the model. Most of the time my p-levels are so small that even doubling them would not result in a value close to the P=0.05 threshold, but I have one case with P=0.033. I thought, probably naively, that running a second model with fixed df, using the value of df found in the first model. I could not achieve this with mgcv: its gam function does not seem to accept fractional values of df (in my case 8.377). So I used the gam package and fixed df to 8.377. The P-value I obtained was slightly larger than with mgcv (0.03655 instead of 0.03328), but it is still 0.05. Was this a correct way to get around the underestimated P-level? Furthermore, although the gam.check function of the mgcv package suggests to me that the gaussian family (and identity link) are adequate for my data, I must say the instructions in R help for family and in Hastie, T. and Tibshirani, R. (1990) Generalized Additive Models are too technical for me. If someone knows a reference that explains how to choose model and link, i.e. what tests to run on your data before choosing, I would really appreciate it. Thanks in advance, Denis Chabot __ 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 Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle__ 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] Change console language ?
Hi, I'm pretty new to R, I've just installed version 2.1.1 on Windows. I have a simple (it seems) doubt - how do I change the Console default Language ? It's set to Portuguese but I would like to view it in English. Thanks in advance, Sérgio Nunes __ 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] p-level in packages mgcv and gam
Thomas Lumley [EMAIL PROTECTED] writes: Bob, on the other hand, chooses the amount of smoothing depending on the data. When a 4 df smooth fits best he ends up with the same model as Alice and the same p-value. When some other df fits best he ends up with a different model and a *smaller* p-value than Alice. This doesn't actually follow, unless the p-value (directly or indirectly) found its way into the definition of best fit. It does show the danger, though. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ 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] Change console language ?
On Wed, 28 Sep 2005, Sérgio Nunes wrote: Hi, I'm pretty new to R, I've just installed version 2.1.1 on Windows. I have a simple (it seems) doubt - how do I change the Console default Language ? It's set to Portuguese but I would like to view it in English. Do read the administration manual (on the help menu, via HTML help). Or, from the rw-FAQ in R-2.2.0-beta 3.2 I want R in English (and not in French/Chinese/...)! The default behaviour of R is to try to run in the language you run Windows in. Apparently some users want Windows in their native language, but not R. To do so, set `LANGUAGE=en' as discussed in Q2.2 and Q2.15. You have not even told us what locale you are in, but I would be suprised if this was Portugal and not Brazil. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595__ 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] gee models summary
I'm running some GEE models but when I request the summary(pcb.gee) all I get are rows and rows of intercorelations and they fill up the screen buffer so I can not even scroll back to see what else might be in the summary. How do I get the summary function to NOT print the intercorrelations? Thanks, -- Dean Sonneborn Programmer Analyst Department of Public Health Sciences University of California, Davis (916) 734-6656 __ 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] Error in make check-all
Dear Peter Dalgaard, first, sorry for my delay to this reply, but I only have acces to this machine in the morning (consider also the time it takes to run make and make check)... It seems that the problem was really with some missing -devel packages. I followed your suggestions and installed libjpeg-devel, tk-devel and tcl-devel. The readline-devel and xorg-x11-devel packages were already installed. After this, I also re-built R, now as 'normal' user to my home folder (/home/fernando/programs/R-2.1.1). So I re-run again make check, make check-devel and make check-all. Everything seems OK now. No more those warnings in tcltk package and in any other. Now going to installation... Thank you very much for your (and Prof Brian Ripley) help! Fernando Mayer. Peter Dalgaard escreveu: Fernando Mayer [EMAIL PROTECTED] writes: Dear Prof. Ripley, that was exactly what i did. Should i login on the system as root, instead of login as user and became root via console? What should i do to have X11 usable? I don't actually think that this is the problem. You shouldn't generally trust me rather than Brian, but I'm sitting at a SUSE 9.3 system, and he's not... If I su - to root, I can happily run xterm etc. from the root shell with display on the console, and also run make check on the current r-devel. So go look for missing RPM packages. That said, it is not generally a good idea to build as root. I prefer to build things as myself and only do the final install step as root if necessary. -pd (PS: I had a powercut when I was either 99.99% or 100.01% done with writing this before. Apologies if it went out twice...) Thanks, Fernando Mayer. Prof Brian Ripley escreveu: This is what happens if you don't have a usable X11 display. Did you perhaps use a root account on a console owned by a normal user? On Tue, 27 Sep 2005, Fernando Mayer wrote: Dear R-users, i'm a very newbie in linux, but decided to build R from source. Following the R Installation and Administration manual, i did this: ./configure --enable-R-shlib # this option is here because i intend to build the GNOME console after... make make check no problems in make check, but: make check-devel #and also make check-all indicated some WARNINGs in the log file: /usr/local/R-2.1.1/tests/tcltk.Rcheck/00check.Rcheck Right below is the content of this log file (I translated some words): [start log file] * using log directory '/usr/local/R-2.1.1/tests/tcltk.Rcheck' * using R version 2.1.1, 2005-06-20 * looks like 'tcltk' is a base package * skipping installation test * checking package directory ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking DESCRIPTION meta-information ... OK * checking package dependencies ... OK * checking index information ... OK * checking package subdirectories ... OK * checking S3 generic/method consistency ... WARNING Erro: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution See section 'Generic functions and methods' of the 'Writing R Extensions' manual. * checking replacement functions ... WARNING Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution In R, the argument of a replacement function which corresponds to the right hand side must be named 'value'. * checking foreign function calls ... WARNING Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution See section 'System and foreign language interfaces' of the 'Writing R Extensions' manual. * checking Rd files ... OK * checking for missing documentation entries ... WARNING Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution All user-level objects in a package should have documentation entries. See chapter 'Writing R documentation files' in manual 'Writing R Extensions'. * checking for code/documentation mismatches ... WARNING Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Interrupted execution Error: .First.lib failed for 'tcltk' Call sequence: 2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)), domain = NA) 1:
Re: [R] gee models summary
This inconvenience does not occur with function geese in package geepack. If you're using function gee in package gee, extract the components you want from the fitted object: library(gee) library(MASS) data(OME) fm - gee(cbind(Correct, Trials-Correct) ~ Loud + Age + OME, id = ID, +data = OME, family = binomial, corstr = exchangeable) [1] Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27 [1] running glm to get initial regression estimate [1] -5.90984676 0.15516993 0.01876291 -0.07569691 -0.31660542 summ.fm - summary(fm) str(summ.fm) List of 11 $ call : language gee(formula = cbind(Correct, Trials - Correct) ~ Loud + Age + OME, id = ID, data = OME, family = binomial, corstr = exchangeable) $ version: chr gee S-function, version 4.13 modified 98/01/27 (1998) $ nobs : int 1097 $ residual.summary : Named num [1:5] -0.959 0.551 2.041 3.121 12.024 ..- attr(*, names)= chr [1:5] Min 1Q Median 3Q ... $ model :List of 3 ..$ link : chr Logit ..$ varfun: chr Binomial ..$ corstr: chr Exchangeable $ title : chr GEE: GENERALIZED LINEAR MODELS FOR DEPENDENT DATA $ coefficients : num [1:5, 1:5] -5.9010 0.1551 0.0185 -0.0418 -0.2856 ... ..- attr(*, dimnames)=List of 2 .. ..$ : chr [1:5] (Intercept) Loud Age OMEhigh ... .. ..$ : chr [1:5] Estimate Naive S.E. Naive z Robust S.E. ... $ working.correlation: num [1:30, 1:30] 1. -0.0234 -0.0234 -0.0234 -0.0234 ... $ scale : num 1.25 $ error : chr Error code was 0 $ iterations : int 4 - attr(*, class)= chr summary.gee summ.fm$coefficients Estimate Naive S.E. Naive z Robust S.E.Robust z (Intercept) -5.90100336 0.336455218 -17.5387482 0.231463368 -25.4943295 Loud 0.15507565 0.007513314 20.6401142 0.005321880 29.1392592 Age 0.01851319 0.003561640 5.1979385 0.003305525 5.6006793 OMEhigh -0.04183516 0.160288285 -0.2609995 0.152182352 -0.2749015 OMElow -0.28563252 0.131496124 -2.1721745 0.117510247 -2.4307031 or better: coef(summ.fm) Estimate Naive S.E. Naive z Robust S.E.Robust z (Intercept) -5.90100336 0.336455218 -17.5387482 0.231463368 -25.4943295 Loud 0.15507565 0.007513314 20.6401142 0.005321880 29.1392592 Age 0.01851319 0.003561640 5.1979385 0.003305525 5.6006793 OMEhigh -0.04183516 0.160288285 -0.2609995 0.152182352 -0.2749015 OMElow -0.28563252 0.131496124 -2.1721745 0.117510247 -2.4307031 Best, Renaud Dean Sonneborn a écrit : I'm running some GEE models but when I request the summary(pcb.gee) all I get are rows and rows of intercorelations and they fill up the screen buffer so I can not even scroll back to see what else might be in the summary. How do I get the summary function to NOT print the intercorrelations? Thanks, -- Renaud Lancelot Directeur Adjoint chargé des Affaires Scientifiques Deputy Director for Scientific Affairs Département EMVT du CIRAD, TA 30/B Campus International de Baillarguet 34398 Montpellier Cedex 5 - France Tel. +33 (0)4 67 59 37 17 Secr. +33 (0)4 67 59 39 04 Fax +33 (0)4 67 59 37 95 __ 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] responses to my question on non-central t
The original question is attached at the end of this message ... In the world of R the excellent mvtnorm package answers my original question and many more that I didn't know I needed to ask. In the world of Splus ( version 6 , Windows XP ) this link :- http://www.biostat.wustl.edu/archives/html/s-news/2002-11/msg00079.html which was provided by Dimitris Rizopoulos, is useful. Sadly in Splus there seems to be no library equivalent to the R mvtnorm package... ... unless someone out there has ported it, or has something similar up their sleeve ?? cheers Bob - Forwarded by Robert Kinley/EMA/LLY on 28/09/2005 17:35 - Robert Kinley [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 14/09/2005 14:24 To [EMAIL PROTECTED], r-help@stat.math.ethz.ch cc Subject [R] non-central t : R v.Splus Hi For bureaucratic reasons beyond my control I need to rewrite an R function (for producing operating characteristic curves) as an Splus function ( version 6 , windows XP ). The R function makes extensive use of the fact that the student's t distribution function pt() has a non-centrality parameter built in ... sadly that parameter is not present in the Splus pt() function . However, the Splus f distribution function pf() does have such a parameter , so I have tried to write my own non-central version of pt() based around pf() , using the relationship between the t and F distributions. Unfortunately my success has been limited ... I can only get correct probabilities for part of the range of the quantile space , failing when the quantile becomes small ... and I'm beginning to wonder whether it's actually possible to do what I want at all , given that the range of x in F(x) is [ 0:Inf ] while that in t(x) is [-Inf , Inf ] , and the non-central t distribution is not symmetric ... Do any wiser heads than mine have any experience or advice to offer ... ? thanks Bob Kinley [[alternative HTML version deleted]] __ 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 [[alternative HTML version deleted]] __ 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] p-level in packages mgcv and gam
But what about another analogy, that of polynomials? You may not be sure what degree polynomial to use, and you have not decided before analysing your data. You fit different polynomials to your data, checking if added degrees increase r2 sufficiently by doing F-tests. I thought it was the same thing with GAMs. You can fit a model with 4 df, and in some cases it is of interest to see if this is a better fit than a linear fit. But why can't you also check if 7df is better than 4df? And if you used mgcv first and it tells you that 7df is better than 4df, why bother repeating the comparison 7df against 4df, why not just take the p-value for the model with 7df (fixed)? Denis Maybe one is in Le 05-09-28 à 12:04, Peter Dalgaard a écrit : Thomas Lumley [EMAIL PROTECTED] writes: Bob, on the other hand, chooses the amount of smoothing depending on the data. When a 4 df smooth fits best he ends up with the same model as Alice and the same p-value. When some other df fits best he ends up with a different model and a *smaller* p-value than Alice. This doesn't actually follow, unless the p-value (directly or indirectly) found its way into the definition of best fit. It does show the danger, though. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ 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] dumping plots
i've heard that you can dump a plot file, and in doing so set a pixel parameter (cbx?). is anyone familar with this procedure? i would appreciate any insight. thanks, kevin __ 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] dumping plots
There's the xpinch and ypinch parameters in the windows() device call. However, as an addition to this question, how do you specify output, say with the savePlot function, to maximize the plot area on an 8 1/2 x 11 sheet of paper? Ken ~~~ Kenneth B. Pierce Jr. Research Ecologist Forestry Sciences Laboratory 3200 SW Jefferson Way Corvallis, OR 97331 [EMAIL PROTECTED] 541 750-7393 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, September 28, 2005 10:19 AM To: r-help@stat.math.ethz.ch Subject: [R] dumping plots i've heard that you can dump a plot file, and in doing so set a pixel parameter (cbx?). is anyone familar with this procedure? i would appreciate any insight. thanks, kevin __ 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-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] p-level in packages mgcv and gam
Just change the df in what Thomas described to the degree of polynomial, and everything he said still applies. Any good book on regression that covers polynomial regression ought to point this out. Andy From: Denis Chabot But what about another analogy, that of polynomials? You may not be sure what degree polynomial to use, and you have not decided before analysing your data. You fit different polynomials to your data, checking if added degrees increase r2 sufficiently by doing F-tests. I thought it was the same thing with GAMs. You can fit a model with 4 df, and in some cases it is of interest to see if this is a better fit than a linear fit. But why can't you also check if 7df is better than 4df? And if you used mgcv first and it tells you that 7df is better than 4df, why bother repeating the comparison 7df against 4df, why not just take the p-value for the model with 7df (fixed)? Denis Maybe one is in Le 05-09-28 à 12:04, Peter Dalgaard a écrit : Thomas Lumley [EMAIL PROTECTED] writes: Bob, on the other hand, chooses the amount of smoothing depending on the data. When a 4 df smooth fits best he ends up with the same model as Alice and the same p-value. When some other df fits best he ends up with a different model and a *smaller* p-value than Alice. This doesn't actually follow, unless the p-value (directly or indirectly) found its way into the definition of best fit. It does show the danger, though. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ 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-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] p-level in packages mgcv and gam
On Wed, 28 Sep 2005, Denis Chabot wrote: But what about another analogy, that of polynomials? You may not be sure what degree polynomial to use, and you have not decided before analysing your data. You fit different polynomials to your data, checking if added degrees increase r2 sufficiently by doing F-tests. Yes, you can. And this procedure gives you incorrect p-values. They may not be very incorrect -- it depends on how much model selection you do, and how strongly the feature you are selecting on is related to the one you are testing. For example, using step() to choose a polynomial in x even when x is unrelated to y and z inflates the Type I error rate by giving a biased estimate of the residual mean squared error: once-function(){ y-rnorm(50);x-runif(50);z-rep(0:1,25) summary(step(lm(y~z), scope=list(lower=~z,upper=~z+x+I(x^2)+I(x^3)+I(x^4)), trace=0))$coef[z,4] } p-replicate(1000,once()) mean(p0.05) [1] 0.072 which is significantly higher than you would expect for an honest level 0.05 test. -thomas __ 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] xyplots
Hi All, I have a four panel xyplot. I wish to plot each point as an open or filled circle depending on the value of an indicator variable. I assume I need to use panel.superpose(), but I can't figure out the syntax from lattice documentation. Running R 2.1 under Mac OS X 10.4.2. Any suggestions would be appreciated. Nathan Nathan Leon Pace, MD, MStat University of Utah Salt Lake City, UT 84132 Office: 801.581.6393 Fax: 801.581.4367 Cell: 801.205.1019 Pager: 801.291.9019 Home: 801.467.2925 [[alternative HTML version deleted]] __ 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] Fast AUC computation
I am doing a simulation with a relatively large data set (20,000 observations) for which I want to calculate the area under the Receiver Operator Curve (AUC) for many parameter combinations. I am using the ROC library and the following commands to generate each AUC: rocobj=rocdemo.sca(truth = ymis, data = model$fitted.values, rule = dxrule.sca) #generation of observed ROC object aucobj=AUC(rocobj) #pulling out just the observed AUC - trapezoidal not integrated but they are pretty slow. Does anyone know of a faster way to get the AUC? Thanks, Nina [[alternative HTML version deleted]] __ 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] xyplots
On 9/28/05, Nathan Leon Pace, MD, MStat [EMAIL PROTECTED] wrote: Hi All, I have a four panel xyplot. I wish to plot each point as an open or filled circle depending on the value of an indicator variable. I assume I need to use panel.superpose(), but I can't figure out the syntax from lattice documentation. Not directly. You do need to change the plotting character (pch). Here are two ways to do it (the second is longer but recommended): dotplot(variety ~ yield | site, data = barley, groups = year, pch = c(1, 16)) dotplot(variety ~ yield | site, data = barley, groups = year, auto.key = TRUE, par.settings = list(superpose.symbol = list(pch = c(1, 16 Deepayan __ 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] correct syntax
Hi I am trying to produce a little table like this: 0 1 0 601 408 1 290 2655 but I cannot get the syntax right. Can anyone help. Stephen -- 27/09/2005 [[alternative HTML version deleted]] __ 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] is it possible to form matrix of matrices...and multiple arrays
booop booop schrieb: Dear sirs, 1...Kindly tell me is it possible to form a matrix which contains a no of matrices.. for eg.. if a,b,c,d are matrices and e is a matrix which contains a,b,c,d as rows and columns.. 2..Is it possible to form array of array of arrays for eg.. A contains two set of arrays (1,2)...and each A[1] and A[2] individually contains two set of arrays I tried like p-list() pa[[[1]]] [[1]] [1]-matrix(1,2,2) pa[[[1]]] [[1]] [2]-matrix(2,2,2) But its not working..kindly tell me whether my approach is wrong or not?.. kindly tell me the possible ways.. thank you.. with regards, shanmugam. - Click here to donate to the Hurricane Katrina relief effort. [[alternative HTML version deleted]] __ 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 I would say yes and yes. A Matrix with matrix entries could be a dataframe or you just use the cbind or rbind command. The array of arrays I would say is a table, then you can specify table[row,coloumn] or table[1..10,1..10]. Greetz, Sonja __ 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] R-code for binormla distribution
Dear users, does any one have a code (S or R) to compute the binormal distribution (or the upper its quadrant area) other than the pmvnorm. Thanks -- Nabil Channouf etudiant en Ph.D. Bureau 3733 Departement d'Informatique et de Recherche Operationnelle (D.I.R.O.) Universite de Montreal, C.P. 6128, succ. Centre-Ville, Montreal, H3C 3J7 Tel.: (514) 343-6111, poste 1796 Fax.: (514) 343-5834 courriel: [EMAIL PROTECTED] __ 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] xyplots
Thanks for suggestions on plotting different symbols in an xyplot by Sarkar and Wiener in answer to my question: I have a four panel xyplot. I wish to plot each point as an open or filled circle depending on the value of an indicator variable. Wiener: You don't even need to tell it to use panel.superpose -- using groups tells it (try it with without and see!). The pch values are set by group (here, value of ind2). It might be more elegant to use trellis.par.set to set the pch values, but I'm lazy. (It seems to have the desired effect -- try subsetting on ind2, and you get a subset of the values.) Hope this helps, Sarkar: Not directly. You do need to change the plotting character (pch). Here are two ways to do it (the second is longer but recommended): dotplot(variety ~ yield | site, data = barley, groups = year, pch = c (1, 16)) dotplot(variety ~ yield | site, data = barley, groups = year, auto.key = TRUE, par.settings = list(superpose.symbol = list(pch = c(1, 16 A related question: My xyplot is essentially a time series (up-and-down experimental design). Thus I need to connect the points sequentially regardless of the group value. With the groups argument, type = 'b' gives two lines - one for each group. Any more suggestions? Thanks, Nathan __ 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] correct syntax
On Thu, 2005-09-29 at 06:57 +1000, Stephen Choularton wrote: Hi I am trying to produce a little table like this: 0 1 0 601 408 1 290 2655 but I cannot get the syntax right. Can anyone help. Stephen Do you have the raw data or only the tabulated counts? If you have the raw data, see ?table for ways to create n-dimensional tables. If you only have the tabulated counts, then you can use matrix(): mat - matrix(c(601, 290, 408, 2655), ncol = 2) dimnames(mat) - list(c(0, 1), c(0, 1)) mat 01 0 601 408 1 290 2655 See ?matrix for more information. HTH, Marc Schwartz __ 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] correct syntax
Stephen Choularton schrieb: Hi I am trying to produce a little table like this: 0 1 0 601 408 1 290 2655 but I cannot get the syntax right. Can anyone help. Stephen vec1= c(0,0,1) vec2= c(NA,601,290) vec3= c(1,408,2655) table = as.table(cbind(vec1,vec2,vec3)) table vec1 vec2 vec3 A0 1 B0 601 408 C1 290 2655 Greetz, Sonja __ 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] After resizing a tkwidget, how do I get the size of the widget??
Dear all, I am trying make a small tcltk thing for drawing graphs with vertices, edges etc. I can draw the graph in a window. - I would like it so that if I resize the window, the graph will also be resized. To do this, I guess I need the size of the window, so that I can calculate the new coordinates. - I would also like to be able to save the graph as e.g. a jpg/ps file. Can anyone help on this? I find the documentation of the tcltk package difficult to comprehend so I have used the examples on http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/. Can anyone point me to other sources of examples/doc of the tcltk package? Thanks in advance Søren __ 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] Problem with memory footprint of qq plot generated with lattice
Dear R helpers, I generate a qq plot using the following function call. qqmath(~val|ind,data=xx ,distribution=function(p) qt(p,df=19) ,ylab=Sample Quatinles ,xlab=Theoretical Quantiles ,aspect=1 ,prepanel = prepanel.qqmathline ,panel=function(x,y) { panel.qqmathline(y, distribution=function(p) qt(p,df=19),col=2) panel.qqmath(x, y , distribution=function(p) qt(p,df=19),pch=.,cex=2) } ) dim(xx) [1] 680237 2 unique(xx[,1]) [1] 500-530 1000-1110 2000-2200 3400-3700 Levels: 500-530 1000-1110 2000-2200 3400-3700 It means that actually four small qqplots are drawn. The problem is that the generated pdf is extremely large. -rw-r--r-- 1 nwew bayes 19734746 2005-08-27 15:38 Distr-qqplot.pdf Suggestions howe to reduce the size but keep the quality are wellcome. cheers Eryk __ 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] Plot Data Points in boxplots
--On 9/27/05 8:55 PM -0400 Gabor Grothendieck sent: Try this: boxplot(Sepal.Length ~ Species, iris) with(iris, stripchart(Sepal.Length ~ Species, vertical = TRUE, add = TRUE)) Thanks very much for the hint. I did something very similar with decent results. The only problem I am having now is that I cannot figure out how to make stripchart plot without a box or axis. Alternatively, I can use DOTplot from UsingR, but I cannot find out how to rotate it for vertical. thanks, aric On 9/27/05, Aric Gregson [EMAIL PROTECTED] wrote: Hello, I would like to plot my data in a fashion similar to a boxplot, but plot the true data points without a box, just overlay lines of the summary generated by the boxplot. __ 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] Plot Data Points in boxplots
Hi Aric Gregson wrote: --On 9/27/05 8:55 PM -0400 Gabor Grothendieck sent: Try this: boxplot(Sepal.Length ~ Species, iris) with(iris, stripchart(Sepal.Length ~ Species, vertical = TRUE, add = TRUE)) Thanks very much for the hint. I did something very similar with decent results. The only problem I am having now is that I cannot figure out how to make stripchart plot without a box or axis. Alternatively, I can use DOTplot from UsingR, but I cannot find out how to rotate it for vertical. You might also like to take a look at Figure 3.27 (and associated R code) on http://www.stat.auckland.ac.nz/~paul/RGraphics/chapter3.html Paul On 9/27/05, Aric Gregson [EMAIL PROTECTED] wrote: Hello, I would like to plot my data in a fashion similar to a boxplot, but plot the true data points without a box, just overlay lines of the summary generated by the boxplot. __ 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 -- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 [EMAIL PROTECTED] http://www.stat.auckland.ac.nz/~paul/ __ 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] Problem with memory footprint of qq plot generated with lattice
nwew [EMAIL PROTECTED] wrote: Dear R helpers, I generate a qq plot using the following function call. ... dim(xx) [1] 680237 2 How about doing something like this: fn - function(n,cut=0.001,m=1000) { p - ppoints(n) p - p[pmin(p, 1-p) cut] q - pt(seq(qt(cut,df=19),qt(1-cut,df=19),length=m),df=19) sort(c(p,q)) } then adding 'f.value=fn' to your qqmath arguments? This essentially says, plot the individual data points in the extreme tails of the distribution (p 0.001 or p 0.999), and evaluate the distribution at a sparse set of points in between, where the density means you can't discern the individual values anyway. -- Dave __ 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] Plot Data Points in boxplots
Aric Gregson wrote: Hello, I would like to plot my data in a fashion similar to a boxplot, but plot the true data points without a box, just overlay lines of the summary generated by the boxplot. I have less than 10 observations within each group, so I think showing the actual data would be more effective than the box of the boxplot. I have been unable to find a way to do this. Here is example data: d168teni d168dh10i d168hb10i d168icc10i d168rcs10i d168t410i d168tb410i 17252 29 8039 68 27647 28 6849 21 3 12385 87 71 164137 45847 50 7018 1 boxplot(d168teni) works to describe the data (each column a column in the plot). However, instead of the boxes, I want the data plotted (in a column) with the 5 summary lines drawn over the points. I have tried using functions from Design and have been unable to find a solution. I think I am missing the point. Any suggestions on where to look or how to approach this differently? I haven't seen anything like this posted, so I'll take a punt. noboxplot-function(x,plot=FALSE,...) { boxplot.info-boxplot(x,plot,...) dimx-dim(x) if(is.null(dimx)) plot(1,x) else { xpts-1:dimx[2] # you may want to use text() here if you want the # actual values displayed matplot(t(as.matrix(x)),axes=FALSE,xlim=c(0.5,dimx[2]+0.5), ylab=deparse(substitute(x))) } box() axis(2) nbp.labels-names(x) if(is.null(nbp.labels)) nbp.labels-as.character(xpts) axis(1,at=xpts,labels=nbp.labels) for(xpos in 1:dimx[2]) { segments(xpos-0.2,boxplot.info$stats[,xpos], xpos+0.2,boxplot.info$stats[,xpos], lwd=c(1,1,3,1,1)) } return(boxplot.info) } Hope it's what you want. Jim __ 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] memory issues with large data set
Hi, I am running R 2.0.1.1. on Windows. It is a Dell Dimension with a 3.2 Ghz Processor and 4Gb RAM. When using the ReadAffy() function to read in 97 arrays, I get the below error messages: Error: cannot allocate vector of size 393529 Reached total allocation of 1024Mb: see help(memory.size) When I use the comman memory.limit(size=4000) to increase the memory size to the maximum available, I got a NULL as a response. I proceeded to re-run ReadAffy(). This time, I only get the first error message. Error: cannot allocate vector of size 393529 From what I've read, this is more of a problem with Windows than with R. But I am wondering if there is anything I can do, either with the set up of R or Windows, to solve this problem and read the data set into R using this machine. Thank you for your attention, Christina __ 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] memory issues with large data set
Christina Yau wrote: Hi, I am running R 2.0.1.1. on Windows. It is a Dell Dimension with a 3.2 Ghz Processor and 4Gb RAM. This question concerns a BioC package, so the correct listserv is [EMAIL PROTECTED], not the R-help listserv. In the future, you should direct questions about BioC packages there. You don't have enough memory to read all 97 arrays into an AffyBatch, not to mention doing any further processing on them. You will have to use justRMA() or justGCRMA() to process your data. In addition, I don't think you can access any more than 2 Gb of RAM anyway without making some changes. See 2.11 of the Windows FAQ. HTH, Jim When using the ReadAffy() function to read in 97 arrays, I get the below error messages: Error: cannot allocate vector of size 393529 Reached total allocation of 1024Mb: see help(memory.size) When I use the comman memory.limit(size=4000) to increase the memory size to the maximum available, I got a NULL as a response. I proceeded to re-run ReadAffy(). This time, I only get the first error message. Error: cannot allocate vector of size 393529 From what I've read, this is more of a problem with Windows than with R. But I am wondering if there is anything I can do, either with the set up of R or Windows, to solve this problem and read the data set into R using this machine. Thank you for your attention, Christina __ 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 -- James W. MacDonald University of Michigan Affymetrix and cDNA Microarray Core 1500 E Medical Center Drive Ann Arbor MI 48109 734-647-5623 ** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues. __ 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] is it possible to form matrix of matrices...and multiple arrays
On 9/28/05, booop booop [EMAIL PROTECTED] wrote: Dear sirs, 1...Kindly tell me is it possible to form a matrix which contains a no of matrices.. for eg.. if a,b,c,d are matrices and e is a matrix which contains a,b,c,d as rows and columns.. Try this: mat - list(diag(2), diag(3), diag(4), diag(5)) dim(mat) - c(2,2) mat mat[[1,1]] 2..Is it possible to form array of array of arrays for eg.. A contains two set of arrays (1,2)...and each A[1] and A[2] individually contains two set of arrays I tried like p-list() pa[[[1]]] [[1]] [1]-matrix(1,2,2) pa[[[1]]] [[1]] [2]-matrix(2,2,2) But its not working..kindly tell me whether my approach is wrong or not?.. Try this. arr is set to a 2x2x2 array filled with diagonal matrices. Then we set two elements of it to constant matrices. arr - lapply(2:9, diag) dim(arr) - c(2,2,2) arr[[1,1,1]] arr arr[[1,1,1]] - matrix(1,2,2) arr[[1,1,2]] - matrix(2,2,2) arr[[1,1,1]] arr[[1,1,2]] __ 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] priceIts
Dear All, There is an example for the priceIts function (the its package) which does not work for me as expected. ?priceIts x1 - priceIts(instrument = c(^ftse), start = 1998-01-01, + quote = Close) Error in validObject(.Object) : invalid class its object: Missing values in dates x2 - priceIts(instrument = c(^gdax), start = 1998-01-01, + quote = Close) Error in download.file(url, destfile, method = method, quiet = quiet) : cannot open URL 'http://chart.yahoo.com/table.csv?s=^gdaxa=0b=01c=1998d=8e=28f=2005g=dq=qy=0z=^gdaxx=.csv' In addition: Warning message: cannot open: HTTP status was '404 Not Found' x - union(x1,x2) Error: Object x1 not found Error in union(x1, x2) : unable to find the argument 'x' in selecting a method for function 'union' names(x) - c(FTSE,DAX) plot(x,lab=TRUE) Any help appreciated. Best wishes, Remigijus __ 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] priceIts
Well I downloaded the data using the link in your message which suggests that the code is right. I don't have its loaded (I assume it's from the irregular time series package) so I can't test the code as you have it. Have you tried checking to see it it is an issue with the internet (your browser, blocked sites etc) rather than a problem in R? Tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Remigijus Lapinskas Sent: Thursday, 29 September 2005 12:31 PM To: r-help@stat.math.ethz.ch Subject: [R] priceIts Dear All, There is an example for the priceIts function (the its package) which does not work for me as expected. ?priceIts x1 - priceIts(instrument = c(^ftse), start = 1998-01-01, + quote = Close) Error in validObject(.Object) : invalid class its object: Missing values in dates x2 - priceIts(instrument = c(^gdax), start = 1998-01-01, + quote = Close) Error in download.file(url, destfile, method = method, quiet = quiet) : cannot open URL 'http://chart.yahoo.com/table.csv?s=^gdaxa=0b=01c=1998d=8; e=28f=2005g=dq=qy=0z=^gdaxx=.csv' In addition: Warning message: cannot open: HTTP status was '404 Not Found' x - union(x1,x2) Error: Object x1 not found Error in union(x1, x2) : unable to find the argument 'x' in selecting a method for function 'union' names(x) - c(FTSE,DAX) plot(x,lab=TRUE) Any help appreciated. Best wishes, Remigijus __ 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-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] priceIts
The error message indicates that a problem is occurring in download.file. Try to use download.file to download some web page from the internet to see if that works, download.file(http://www.google.com;, destfile = google.htm) If that does NOT work then examine the download.file help page carefully. You may need to set your proxy server. If that did work then as a workaround try using get.hist.quote in package tseries with the argument retclass = its. Be sure you have the latest version of tseries. On 9/29/05, Remigijus Lapinskas [EMAIL PROTECTED] wrote: Dear All, There is an example for the priceIts function (the its package) which does not work for me as expected. ?priceIts x1 - priceIts(instrument = c(^ftse), start = 1998-01-01, + quote = Close) Error in validObject(.Object) : invalid class its object: Missing values in dates x2 - priceIts(instrument = c(^gdax), start = 1998-01-01, + quote = Close) Error in download.file(url, destfile, method = method, quiet = quiet) : cannot open URL 'http://chart.yahoo.com/table.csv?s=^gdaxa=0b=01c=1998d=8e=28f=2005g=dq=qy=0z=^gdaxx=.csv' In addition: Warning message: cannot open: HTTP status was '404 Not Found' x - union(x1,x2) Error: Object x1 not found Error in union(x1, x2) : unable to find the argument 'x' in selecting a method for function 'union' names(x) - c(FTSE,DAX) plot(x,lab=TRUE) Any help appreciated. Best wishes, Remigijus __ 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-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