[R] How to bootstrap Kaplan-Miere estimator with 95% envelope
Hi all, Given a typical right-censoring data which contains a time variable and a censoring indicator. How do we bootstrap samples to obtain a 95% envelope for the estimated cumulative hazard function? Thanks in advance. Rui __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] How to obtain a 95% envelope for the estimated cumulaitve hazard function via bootstrap?
Hi all, Given a typical right-censoring data which contains a time variable and a censoring indicator. How do we bootstrap samples to obtain a 95% envelope for the estimated cumulative hazard function? Rui __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Discrepency between R and MlwiN
On Sun, 12 Sep 2004, Damian Betebenner wrote: When playing around fitting unconditional growth models using R and MlwiN today, I produced two different sets of estimates that I can't reconcile and wondered if anyone here has an idea: The data is two-level repeated measures data with measures nested within child. There are two measures per child. I've fit an unconditional growth model as in Singer and Willet (2003) that allows for variable intercepts and slopes. The R code for the analysis is: model.uncgrowth.2lev - lme(math ~ grade, mathdata, random=~grade|studentid) The fixed effects estimates for the intercept and slope are the same between MlwiN and R. It's the random effects estimates that differ. In particular, the residual error variance is ZERO using MlwiN and significantly non-zero using R. It appears that MlwiN perfectly fits lines to each of the two data points supplied for each student and R does not. The two program yield the same results when the covariate grade is treated as a fixed effect. Also, I used REML on both R and MlwiN. Anyone have any idea how to explain this descrpency? Are there always two points per student? If so, your model is not identifiable (in so far as I understand what you are doing) and there is an infinite set of parameters which give the same restricted likelihood. Please check if the latter is the case for the two sets of results. For each student you have a random intercept, a random slope and measurement error at each point. That's 4 random variables to explain 2 observations. In short, you appear to have chosen a model that overfits. -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] do.call(dim- , ... )
OK guys another problem. I have a 3D array x with dim(x)=c(a,a,b^2) and I want to rearrange the elements of x to make a matrix y with dimensions c(a*b,a*b). Neither a nor b is known in advance. I want the n-th a*a submatrix of y to be x[,,n] (where 1 = n = b^2). Needless to say, this has gotta be vectorized! Toy example with a=2, b=3 follows: Given: x - array(1:36,c(2,2,9)) I require: y - matrix(as.integer(c( 1, 2, 5, 6, 9,10, 3, 4, 7, 8,11,12, 13,14,17,18,21,22, 15,16,19,20,23,24, 25,26,29,30,33,34, 27,28,31,32,35,36 )),6,6) So identical(x[,,1] , y[1:2,1:2]) identical(x[,,2] , y[3:4,1:2]) [snip] identical(x[,,9] , y[5:6,5:6]) all return TRUE. OBattempts: (i) dim(x) - c(4,9);x - t(x) ; dim(x) - c(6,6) ; y - x (ii) y - aperm(x,c(2,1,3)) ; dim(y) - c(6,6) Any genius out there with some ideas? -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre SO14 3ZH tel +44(0)23-8059-7743 [EMAIL PROTECTED] (edit in obvious way; spam precaution) __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Adding ranks to a repeatedly ragged array
How can I add an extra column containing the rank to a ragged array indexed by more than one grouping factors? E.g. with the barley dataset: How can I to add an additional column ``rank'' containing the rank of the ``yield'' of the different varieties in relation to the indices ``year'' and ``site'' to the barley dataframe? I achieved to calculate the ranks with: rank.lists - with( barley, tapply( yield, list( site=site, year=year ), rank ) ) but I do not manage to merge this result to the original dataframe ``barley''. Thanks! Wolfram __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] permuting dimensions (was do.call(dim- , ... ))
What has this to do with the original subject line? Replacement functions are not intended to be used directly, and certainly not in do.call. See ?aperm, as in xx - x dim(xx) - c(2,2,3,3) xx - aperm(xx, c(1,3,2,4)) dim(xx) - c(6, 6) xx as required. BTW, you have a broken package `magic' on CRAN: please do us the courtesy of fixing it so we don't continually have to look at it in tests. See http://cran.r-project.org/src/contrib/checkSummary.html On Mon, 13 Sep 2004, Robin Hankin wrote: OK guys another problem. I have a 3D array x with dim(x)=c(a,a,b^2) and I want to rearrange the elements of x to make a matrix y with dimensions c(a*b,a*b). Neither a nor b is known in advance. I want the n-th a*a submatrix of y to be x[,,n] (where 1 = n = b^2). Needless to say, this has gotta be vectorized! Toy example with a=2, b=3 follows: Given: x - array(1:36,c(2,2,9)) I require: y - matrix(as.integer(c( 1, 2, 5, 6, 9,10, 3, 4, 7, 8,11,12, 13,14,17,18,21,22, 15,16,19,20,23,24, 25,26,29,30,33,34, 27,28,31,32,35,36 )),6,6) So identical(x[,,1] , y[1:2,1:2]) identical(x[,,2] , y[3:4,1:2]) [snip] identical(x[,,9] , y[5:6,5:6]) all return TRUE. OBattempts: (i) dim(x) - c(4,9);x - t(x) ; dim(x) - c(6,6) ; y - x (ii) y - aperm(x,c(2,1,3)) ; dim(y) - c(6,6) Any genius out there with some ideas? -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Re: Variable Importance in pls: R or B? (and in glpls?)
On Sunday 12 September 2004 14:12, Christoph Lehmann wrote: Dear R-users, dear Ron I use pls from the pls.pcr package for classification. Since I need to know which variables are most influential onto the classification performance, what criteria shall I look at: a) B, the array of regression coefficients for a certain model (means a certain number of latent variables) (and: squared or absolute values?) The regression coefficients give the most direct information on which variables influence the classification, although you must be careful with the interpretation if the variables are correlated. So it is the absolute magitude that is important; why would you look at the squared values? OR b) the weight matrix RR (or R in the De Jong publication; in Ding Gentleman this is the P Matrix and called 'loadings')? (and again: squared or absolute values?) The object that is returned contains X and Y loadings (which are _not_ equal to te RR matrix, btw); these are mainly used for interpretation. The regression coefficients give information on your complete model; the loadings on individual components of the model. Ron and what about glpls (glpls1a) ? shall I look at the 'coefficients' (regression coefficients)? Thanks for clarification Christoph -- Ron Wehrens Institute for Molecules and Materials, Analytical Chemistry Radboud University Email: [EMAIL PROTECTED] Toernooiveld 1 http://www.science.ru.nl/cac 6525 ED NijmegenTel: +31 24 365 2053 The Netherlands Fax: +31 24 365 2653 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Adding ranks to a repeatedly ragged array
What do you mean by `a repeatedly ragged array': you haven't defined it? There is no dataset `barley' in vanilla R. Which one did you mean? There is a data frame in package lattice, but that is neither an array nor ragged. If that is what you want, rank.lists will be a list matrix. The easiest thing to do is to find out the corresponding row numbers and assign there. pos - with(barley, tapply(1:120, list(site=site, year=year), na.pass)) barley[unlist(pos), ranks] - unlist(rank.lists) On Mon, 13 Sep 2004, Wolfram Fischer wrote: How can I add an extra column containing the rank to a ragged array indexed by more than one grouping factors? E.g. with the barley dataset: How can I to add an additional column ``rank'' containing the rank of the ``yield'' of the different varieties in relation to the indices ``year'' and ``site'' to the barley dataframe? I achieved to calculate the ranks with: rank.lists - with( barley, tapply( yield, list( site=site, year=year ), rank ) ) but I do not manage to merge this result to the original dataframe ``barley''. PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Please do as that asks, including reading its references. We should not have to guess at the meaning of your subject line, where you got a dataset from etc. -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] an integration question
Dear all, I'm stuck on a problem concerning integration..Results from the analytical expression and numerical approximation (as returned by integrate()) do not match. It probably depends on some error of mine, so apologizes for this off-topic question. I'm interested in computing the integral of f where: f-function(x){exp(-3-.2*pmin(x-7.5,0))} x-seq(0,15,length=50) plot(x, f(x),type=l) Using the integrate() function, I get reasonable results a-sapply(x, function(xx)integrate(f,0,xx)[[1]]) plot(x, a,type=l) Using analytical expression, the primitive of f is (or should be..) F-function(x){exp(-3-.2*pmin(x-7.5,0))/(-.2*I(x7.5))} plot(x,(F(x)-F(0)), type=l) The problem is that for x7.5 the denominator (-.2*I(x7.5)) is zero and then the primitive function F(.) goes to infinity. On the other hand integrate() provides finite (as it should be, I believe) output. For x7.5 everything works. F(10)-F(0) [1] -Inf .. integrate(f,0,10) 0.9911831 with absolute error 1.1e-14 F(5)-F(0) [1] 0.7052258 .. integrate(f,0,5) 0.7052258 with absolute error 7.8e-15 Hence I think there is an error in the expression of H(.), but I can not figure out where it is..Please can anyone help me? I would like to get an analytical expression for F. Many thanks, vito __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R and perl on solaris
Dear all, I am developing a GUI in perl-Tk and I would use R engine to make some analysis and some plots. I have seen that the package RSPerl allows R from perl exchanges but this package is developed on and for intel based computers. When I try to install the package on solaris I have some errors has somebody already used RSPerl on solaris ? Many thanks, Patrick __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [Rd] Re: [R] Sweave echoing comments (again)
On Wed, 08 Sep 2004 17:46:51 +0200, Wolski (W) wrote: Hi! I observed it also. There are cases where it is not desirable. It will be quite helpfull, if possible, to have a parameter that allows one to switch of removing the #comments. The problem is that the parser does not keep the comments, and I need to parse deparse the source in order to know when expressions are complete, such that I can insert the ourtput in the right places. Currently there is no way of keepng the comments in Sweave code chunks. Best, Fritz PS: I am promising a workaround for quite some time now, but haven't had the time to code that yet, so don't hold your breath. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Discrepency between R and MlwiN
Prof Brian Ripley [EMAIL PROTECTED] writes: On Sun, 12 Sep 2004, Damian Betebenner wrote: When playing around fitting unconditional growth models using R and MlwiN today, I produced two different sets of estimates that I can't reconcile and wondered if anyone here has an idea: The data is two-level repeated measures data with measures nested within child. There are two measures per child. I've fit an unconditional growth model as in Singer and Willet (2003) that allows for variable intercepts and slopes. Are there always two points per student? If so, your model is not identifiable (in so far as I understand what you are doing) and there is an infinite set of parameters which give the same restricted likelihood. Please check if the latter is the case for the two sets of results. For each student you have a random intercept, a random slope and measurement error at each point. That's 4 random variables to explain 2 observations. Actually, I don't think that's necessarily a problem (more r.v.'s than observations), is it?. However, assuming that the two points are the same for each student, you have an empirical covariance matrix (3 values) and explain it using the variance of A, and B, and the covariance between them, *and* the residual error, i.e. four parameters, and that surely is a problem. In short, you appear to have chosen a model that overfits. Yup. And the current lme() algorithm is not very good at detecting such singularities, although it should be apparent from the covariance matrix of the random-effects parameters. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] SJava, Client X11
This is *R* help, and you are asking about an *Omegahat* package, and indeed about debugging your local installation. In theory Omegahat has its own mailing lists. But to answer your question: Does anyone success on running the SJava examples with an X11 client console? Yes, I have done so in 2003. This is an issue about how you set up Java, and it is often very slow indeed. It is really is not an appropriate question for R-help: it is not about R nor about an R package. On Mon, 13 Sep 2004, laurent buffat wrote: Hi everyone, I have not received any response on my question, probably because I don't give sufficient information, but unfortunately, I don't have more information on my problem. So I have a simple question: Does anyone success on running the SJava examples with an X11 client console? Thanks for your help. Laurent -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Laurent Buffat Envoyé : jeudi 9 septembre 2004 17:20 À : [EMAIL PROTECTED] Objet : [R] SJava, Client X11 Hi, I have installed the SJava package (see http://www.omegahat.org/RSJava/ ) without any problem. I was able to run the examples (see http://www.omegahat.org/RSJava/examples/index.html ) from R, on my R Linux server and directly on the display of the server, But, if I run theses examples on an X11 client, under Linux or windows, with a correct configuration of the X11 client (export DISPLAY=machine:0.0 on Linux for example), I have a scratch of the R session without any messages For example: library(SJava) .JavaInit() source(DynamicButtonCallback.R) Run perfectly on the server, with a creation of a button on the display. But the same instructions, on the X11 client, create the button and immediately crash the R session and destroy the button. Any Ideas? Thanks for your help. Laurent [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R and perl on solaris
Patrick, This isn't answering your question, but there are other ways to go about this problem. See http://tolstoy.newcastle.edu.au/R/help/04/05/0952.html for instance Further searching might bring more hits. Sean - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 13, 2004 5:23 AM Subject: [R] R and perl on solaris Dear all, I am developing a GUI in perl-Tk and I would use R engine to make some analysis and some plots. I have seen that the package RSPerl allows R from perl exchanges but this package is developed on and for intel based computers. When I try to install the package on solaris I have some errors has somebody already used RSPerl on solaris ? Many thanks, Patrick __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] Rd files with % (was: permuting dimensions)
I suppose the source for ?%in% in base would be a good place to look: \name{match} \alias{match} \alias{\%in\%} [...] \usage{ match(x, table, nomatch = NA, incomparables = FALSE) x \%in\% table } [...] \details{ \code{\%in\%} is currently defined as \cr \code{\%in\% - function(x, table) match(x, table, nomatch = 0) 0} [...] \examples{ [...] 1:10 \%in\% c(1,3,5,9) sstr - c(c,ab,B,bba,c,@,bla,a,Ba,\%) sstr[sstr \%in\% c(letters,LETTERS)] \%w/o\% - function(x,y) x[!x \%in\% y] #-- x without y (1:10) \%w/o\% c(3,7,12) } [...] Andy From: Robin Hankin Professor Ripley thanks for this. Very much appreciated. The original subject line reflected my late-night conviction that the answer might involve passing a strange list to do.call(). Anyway, package magic is broken (only in R-devel, I might add) because I have a function called %eq%. R-2.0.0 CMD check is stopping (I think) because it interprets the % as a control character. Does anyone have a best-practice example of a package that includes a function like %eq% that I could modify? In particular, how do I get \usage{m1 %eq% m2} and \examples{..} to work nicely? best wishes rksh What has this to do with the original subject line? Replacement functions are not intended to be used directly, and certainly not in do.call. See ?aperm, as in xx - x dim(xx) - c(2,2,3,3) xx - aperm(xx, c(1,3,2,4)) dim(xx) - c(6, 6) xx as required. BTW, you have a broken package `magic' on CRAN: please do us the courtesy of fixing it so we don't continually have to look at it in tests. See http://cran.r-project.org/src/contrib/checkSummary.html -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre SO14 3ZH tel +44(0)23-8059-7743 [EMAIL PROTECTED] (edit in obvious way; spam precaution) __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Mixture Analysis
Dear all, Does anyone know if the mixture analysis (i.e : sexual dimorphism, age group, ) can be done with R software ? Thanks for your help Dan - és pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici ! [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spare some CPU cycles for testing lme?
On Mon, 2004-09-13 at 07:40, Frank Samuelson wrote: If anyone has a few extra CPU cycles to spare, I'd appreciate it if you could verify a problem that I have encountered. Run the code below and tell me if it crashes your R before completion. library(lme4) data(bdf) dump-sapply( 1:5, function(i) { fm - lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf, random = ~ IQ.ver.cen | schoolNR); cat( ,i,\r) 0 }) The above code simply reruns the example from the lme help page a large number of times and returns a bunch of 0's, so you'll need to have the lme4 and Matrix packages installed. It might take a while to complete, but you can always nice it and let it run. I'm attempting to bootstrap lme() from the lme4 package, but it causes a segfault after a couple hundred iterations. This happens on my Linux x86 RedHat 7.3, 8.0, 9.0, FC1 systems w/ 1.9.1 and devel 2.0.0 (not all possible combinations actually tested.) I've communicated w/ Douglas Bates about this and he doesn't appear to have the problem. Thanks for any help. -Frank Replicated here on FC 2 running: Version 1.9.1 Patched (2004-09-07) The backtrace from gdb follows. It would probably make sense to move this thread to r-devel. As you can see, it got through 10,546 runs before segfaulting. cc: to Doug. HTH, Marc Schwartz dump-sapply( 1:5, function(i) { + fm - lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf, +random = ~ IQ.ver.cen | schoolNR); + cat( ,i,\r) + 0 + }) 10546 Program received signal SIGSEGV, Segmentation fault. 0x00982242 in _int_free () from /lib/tls/libc.so.6 (gdb) bt #0 0x00982242 in _int_free () from /lib/tls/libc.so.6 #1 0x0098373b in free () from /lib/tls/libc.so.6 #2 0x080c4003 in ReleaseLargeFreeVectors () at memory.c:695 #3 0x080c5999 in RunGenCollect (size_needed=1144) at memory.c:1282 #4 0x080c7084 in R_gc_internal (size_needed=1144) at memory.c:1933 #5 0x080c6b67 in Rf_allocVector (type=16, length=2287) at memory.c:1788 #6 0x0809b6b1 in Rf_duplicate (s=0xbed5d40) at duplicate.c:150 #7 0x0809b335 in Rf_duplicate (s=0xb64a3bc) at duplicate.c:100 #8 0x0809b517 in Rf_duplicate (s=0xbed15a8) at duplicate.c:142 #9 0x0809b777 in Rf_duplicate (s=0xb3f6048) at duplicate.c:137 #10 0x080a796d in EnsureLocal (symbol=0x9719f38, rho=0xb64c2b8) at eval.c:765 #11 0x080a8691 in evalseq (expr=0x9719f38, rho=0xb64c2b8, forcelocal=1, tmploc=0xb64a340) at eval.c:1135 #12 0x080a8847 in applydefine (call=0x97f9818, op=0x9705264, args=0x97f9834, rho=0xb64c2b8) at eval.c:1199 #13 0x080a7055 in Rf_eval (e=0x97f9818, rho=0xb64c2b8) at eval.c:375 #14 0x080a8436 in do_begin (call=0x97f97fc, op=0x9705168, args=0x97f97e0, rho=0xb64c2b8) at eval.c:1046 #15 0x080a7055 in Rf_eval (e=0x97f97fc, rho=0xb64c2b8) at eval.c:375 #16 0x080a7055 in Rf_eval (e=0x97f9bdc, rho=0xb64c2b8) at eval.c:375 #17 0x080a8436 in do_begin (call=0x97f4ac8, op=0x9705168, args=0x97f9bc0, rho=0xb64c2b8) at eval.c:1046 #18 0x080a7055 in Rf_eval (e=0x97f4ac8, rho=0xb64c2b8) at eval.c:375 #19 0x080a7301 in Rf_applyClosure (call=0xb64c130, op=0x97f9a8c, arglist=0xb64c050, rho=0xb65989c, suppliedenv=0xb64c0f8) at eval.c:566 #20 0x080cd2fb in applyMethod (call=0xb64c130, op=0x97f9a8c, args=0xb64c050, rho=0xb65989c, newrho=0xb64c0f8) at objects.c:119 #21 0x080cd985 in Rf_usemethod (generic=0x81a1f2b [, obj=0xb3ebbc0, call=0x9a668f0, args=0xb64c050, rho=0xb65989c, callrho=0xb65989c, defrho=0x96f6338, ans=0xfef58728) at objects.c:326 #22 0x080a994d in Rf_DispatchOrEval (call=0x9a668f0, op=0x9705050, generic=0x81a1f2b [, args=0xb64bffc, rho=0xb65989c, ans=0xfef58728, dropmissing=0, argsevald=1) at eval.c:1719 #23 0x0811d5aa in do_subset (call=0x9a668f0, op=0x9705050, args=0x9a66944, rho=0xb65989c) at subset.c:504 #24 0x080a7055 in Rf_eval (e=0x9a668f0, rho=0xb65989c) at eval.c:375 #25 0x080a8bc3 in do_set (call=0x9a66880, op=0x9705264, args=0x9a668b8, rho=0xb65989c) at eval.c:1271 #26 0x080a7055 in Rf_eval (e=0x9a66880, rho=0xb65989c) at eval.c:375 ---Type return to continue, or q return to quit--- #27 0x080a8436 in do_begin (call=0x9a67184, op=0x9705168, args=0x9a66864, rho=0xb65989c) at eval.c:1046 #28 0x080a7055 in Rf_eval (e=0x9a67184, rho=0xb65989c) at eval.c:375 #29 0x080a7055 in Rf_eval (e=0x9a66c44, rho=0xb65989c) at eval.c:375 #30 0x080a8436 in do_begin (call=0x9a66b10, op=0x9705168, args=0x9a66c28, rho=0xb65989c) at eval.c:1046 #31 0x080a7055 in Rf_eval (e=0x9a66b10, rho=0xb65989c) at eval.c:375 #32 0x080a7301 in Rf_applyClosure (call=0xb659730, op=0x9a67900, arglist=0xb65a558, rho=0xb65966c, suppliedenv=0xb6596f8) at eval.c:566 #33 0x080cd2fb in applyMethod (call=0xb659730, op=0x9a67900, args=0xb65a558, rho=0xb65966c, newrho=0xb6596f8) at objects.c:119 #34 0x080cd985 in Rf_usemethod (generic=0x9b1f300 model.matrix, obj=0xb415a64, call=0x9a6783c, args=0x96f6338, rho=0xb65966c, callrho=0xb415bb4, defrho=0xa038100,
[R] lmList for glm
Greetings all, Is there a way to do the equivalent of a lmList (fit separate models for each subject) in the package nlme for a glm? Thank you very much, Peter B. [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Smoothing using the kernel distribution
Hi, Does anyone can tell me if R sofware can be used for the smoothing using the kernel distribution ? I will appreciate Dan - és pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici ! [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spare some CPU cycles for testing lme?
Marc Schwartz wrote: On Mon, 2004-09-13 at 07:40, Frank Samuelson wrote: If anyone has a few extra CPU cycles to spare, I'd appreciate it if you could verify a problem that I have encountered. Run the code below and tell me if it crashes your R before completion. library(lme4) data(bdf) dump-sapply( 1:5, function(i) { fm - lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf, random = ~ IQ.ver.cen | schoolNR); cat( ,i,\r) 0 }) The above code simply reruns the example from the lme help page a large number of times and returns a bunch of 0's, so you'll need to have the lme4 and Matrix packages installed. It might take a while to complete, but you can always nice it and let it run. I'm attempting to bootstrap lme() from the lme4 package, but it causes a segfault after a couple hundred iterations. This happens on my Linux x86 RedHat 7.3, 8.0, 9.0, FC1 systems w/ 1.9.1 and devel 2.0.0 (not all possible combinations actually tested.) I've communicated w/ Douglas Bates about this and he doesn't appear to have the problem. Thanks for any help. -Frank Replicated here on FC 2 running: Version 1.9.1 Patched (2004-09-07) The backtrace from gdb follows. It would probably make sense to move this thread to r-devel. As you can see, it got through 10,546 runs before segfaulting. cc: to Doug. HTH, Marc Schwartz dump-sapply( 1:5, function(i) { + fm - lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf, +random = ~ IQ.ver.cen | schoolNR); + cat( ,i,\r) + 0 + }) 10546 Program received signal SIGSEGV, Segmentation fault. 0x00982242 in _int_free () from /lib/tls/libc.so.6 (gdb) bt #0 0x00982242 in _int_free () from /lib/tls/libc.so.6 #1 0x0098373b in free () from /lib/tls/libc.so.6 #2 0x080c4003 in ReleaseLargeFreeVectors () at memory.c:695 #3 0x080c5999 in RunGenCollect (size_needed=1144) at memory.c:1282 #4 0x080c7084 in R_gc_internal (size_needed=1144) at memory.c:1933 #5 0x080c6b67 in Rf_allocVector (type=16, length=2287) at memory.c:1788 #6 0x0809b6b1 in Rf_duplicate (s=0xbed5d40) at duplicate.c:150 #7 0x0809b335 in Rf_duplicate (s=0xb64a3bc) at duplicate.c:100 #8 0x0809b517 in Rf_duplicate (s=0xbed15a8) at duplicate.c:142 #9 0x0809b777 in Rf_duplicate (s=0xb3f6048) at duplicate.c:137 #10 0x080a796d in EnsureLocal (symbol=0x9719f38, rho=0xb64c2b8) at eval.c:765 #11 0x080a8691 in evalseq (expr=0x9719f38, rho=0xb64c2b8, forcelocal=1, tmploc=0xb64a340) at eval.c:1135 #12 0x080a8847 in applydefine (call=0x97f9818, op=0x9705264, args=0x97f9834, rho=0xb64c2b8) at eval.c:1199 #13 0x080a7055 in Rf_eval (e=0x97f9818, rho=0xb64c2b8) at eval.c:375 #14 0x080a8436 in do_begin (call=0x97f97fc, op=0x9705168, args=0x97f97e0, rho=0xb64c2b8) at eval.c:1046 #15 0x080a7055 in Rf_eval (e=0x97f97fc, rho=0xb64c2b8) at eval.c:375 #16 0x080a7055 in Rf_eval (e=0x97f9bdc, rho=0xb64c2b8) at eval.c:375 #17 0x080a8436 in do_begin (call=0x97f4ac8, op=0x9705168, args=0x97f9bc0, rho=0xb64c2b8) at eval.c:1046 #18 0x080a7055 in Rf_eval (e=0x97f4ac8, rho=0xb64c2b8) at eval.c:375 #19 0x080a7301 in Rf_applyClosure (call=0xb64c130, op=0x97f9a8c, arglist=0xb64c050, rho=0xb65989c, suppliedenv=0xb64c0f8) at eval.c:566 #20 0x080cd2fb in applyMethod (call=0xb64c130, op=0x97f9a8c, args=0xb64c050, rho=0xb65989c, newrho=0xb64c0f8) at objects.c:119 #21 0x080cd985 in Rf_usemethod (generic=0x81a1f2b [, obj=0xb3ebbc0, call=0x9a668f0, args=0xb64c050, rho=0xb65989c, callrho=0xb65989c, defrho=0x96f6338, ans=0xfef58728) at objects.c:326 #22 0x080a994d in Rf_DispatchOrEval (call=0x9a668f0, op=0x9705050, generic=0x81a1f2b [, args=0xb64bffc, rho=0xb65989c, ans=0xfef58728, dropmissing=0, argsevald=1) at eval.c:1719 #23 0x0811d5aa in do_subset (call=0x9a668f0, op=0x9705050, args=0x9a66944, rho=0xb65989c) at subset.c:504 #24 0x080a7055 in Rf_eval (e=0x9a668f0, rho=0xb65989c) at eval.c:375 #25 0x080a8bc3 in do_set (call=0x9a66880, op=0x9705264, args=0x9a668b8, rho=0xb65989c) at eval.c:1271 #26 0x080a7055 in Rf_eval (e=0x9a66880, rho=0xb65989c) at eval.c:375 ---Type return to continue, or q return to quit--- #27 0x080a8436 in do_begin (call=0x9a67184, op=0x9705168, args=0x9a66864, rho=0xb65989c) at eval.c:1046 #28 0x080a7055 in Rf_eval (e=0x9a67184, rho=0xb65989c) at eval.c:375 #29 0x080a7055 in Rf_eval (e=0x9a66c44, rho=0xb65989c) at eval.c:375 #30 0x080a8436 in do_begin (call=0x9a66b10, op=0x9705168, args=0x9a66c28, rho=0xb65989c) at eval.c:1046 #31 0x080a7055 in Rf_eval (e=0x9a66b10, rho=0xb65989c) at eval.c:375 #32 0x080a7301 in Rf_applyClosure (call=0xb659730, op=0x9a67900, arglist=0xb65a558, rho=0xb65966c, suppliedenv=0xb6596f8) at eval.c:566 #33 0x080cd2fb in applyMethod (call=0xb659730, op=0x9a67900, args=0xb65a558, rho=0xb65966c, newrho=0xb6596f8) at objects.c:119 #34 0x080cd985 in Rf_usemethod (generic=0x9b1f300 model.matrix, obj=0xb415a64, call=0x9a6783c, args=0x96f6338, rho=0xb65966c, callrho=0xb415bb4, defrho=0xa038100, ans=0xfef59288) at objects.c:326 #35
[R] bagplot()
Hello, I saw a little discussion about this in the archives, but it was unclear to me whether someone had submitted a port to R of the Splus bagplot() function. If so, does anyone know where I could get it? Thanks. Best, Matt __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Smoothing using the kernel distribution
Since you have now asked this three times: Yes, yes, yes. R comes with a pacakge called KernSmooth, for example. On Mon, 13 Sep 2004, bournery alexandre wrote: Does anyone can tell me if R sofware can be used for the smoothing using the kernel distribution ? -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] bagplot()
There is no bagplot function in S-PLUS. There is one by Rousseeuw et al for S at http://www.agoras.ua.ac.be/Locdept.htm and a reply in the archives about the problems of porting at: http://maths.newcastle.edu.au/~rking/R/help/03b/4916.html My guess is that like several other cases, R porting has exposed bugs in the original code. On Mon, 13 Sep 2004, Matthew David Sylvester wrote: I saw a little discussion about this in the archives, but it was unclear to me whether someone had submitted a port to R of the Splus bagplot() function. If so, does anyone know where I could get it? Thanks. -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] Variable Importance in pls: R or B? (and in glpls?)
Christoph: I noted that there were not a great number of people leaping to reply. One reason, I suspect, is that there's really NO GOOD ANSWER to this question. First, there is a huge literature on this -- it's related to variable selection in regression and shrinkage estimates, but, in general, parsimonious model building; second, as Ron Wehrens already noted, when variables are correlated -- which could have as much to do with the vagaries of the sampling as to real physical causality -- the whole notion of variable importance is problematic. Fact is, **any** attempt to rank the contributions of particular variables to PLS components from undesigned data (the usual case) is fraught with hazard. For that reason, it is perhaps best to view pls as merely a way of developing a good predictor, not as a way to uncover causal relationships. I know this is often unsatisfying to scientists trying to build parsimonious mechanistic models (= physical theories), especially as there is quite often little likelihood that the data are representative of any underlying population and therefore capable of predicting anything, but it is the statistical reality. For a more informed, more interesting, and more eloquent discussion of these and related issues, you might look up Leo Breiman's writings on his web site and his way of trying to assess variable importance in his Random Forest methodology, which is available in the package randomForest on CRAN. (I make no claim about the effectiveness of this approach -- only that it is clearly different way of approaching the issue that clearly reveals the dilemmas). Cheers, -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christoph Lehmann Sent: Sunday, September 12, 2004 5:13 AM To: Ron Wehrens; [EMAIL PROTECTED] Subject: [R] Variable Importance in pls: R or B? (and in glpls?) Dear R-users, dear Ron I use pls from the pls.pcr package for classification. Since I need to know which variables are most influential onto the classification performance, what criteria shall I look at: a) B, the array of regression coefficients for a certain model (means a certain number of latent variables) (and: squared or absolute values?) OR b) the weight matrix RR (or R in the De Jong publication; in Ding Gentleman this is the P Matrix and called 'loadings')? (and again: squared or absolute values?) and what about glpls (glpls1a) ? shall I look at the 'coefficients' (regression coefficients)? Thanks for clarification Christoph __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Kernel distribution
See ?density or try help.search(kernel) On Mon, 2004-09-13 at 16:05, Alexandre Bournery wrote: Hello, Does anyone could tell me if R sofware can be used for smoothing, using the kernel distribution ? I will appreciate Alex [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] How to show the symbol of Angstrom ?
Also, I am wondering if there is any source where the expressions of many symbols are collected. Thanks you very much!!! Li, Xiang(Sean) __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] bagplot()
There's now a vioplot package on CRAN, if that's what you're looking for. Andy From: Matthew David Sylvester Hello, I saw a little discussion about this in the archives, but it was unclear to me whether someone had submitted a port to R of the Splus bagplot() function. If so, does anyone know where I could get it? Thanks. Best, Matt __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R-help
Dear all, Does anyone know how to read files with .dbf extension? Thanks for your time. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R-help
Did you do a search at www.r-project.org - R site search? Searching for .dbf there just now exposed a read.shape function in the maptools package. hope this helps. p.s. Did you read the posting guide! http://www.R-project.org/posting-guide.html;? Tips provided there may help you answer questions like this for yourself. Failing that, they may also help you formulate your questions so you are more likely to get useful replies. Buena suerte. Fuensanta Saura Igual wrote: Dear all, Does anyone know how to read files with .dbf extension? Thanks for your time. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Spencer Graves, PhD, Senior Development Engineer O: (408)938-4420; mobile: (408)655-4567 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] lmList for glm
Have you looked at GLMM in package lme4? hope this helps. spencer graves p.s. Have you read the posting guide! http://www.R-project.org/posting-guide.html;? It might help you get answers to questions like this for yourself quicker than waiting for this list to reply. It may also increase the likelihood that questions you do post here get useful answers. Peter B. Mandeville wrote: Greetings all, Is there a way to do the equivalent of a lmList (fit separate models for each subject) in the package nlme for a glm? Thank you very much, Peter B. [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Spencer Graves, PhD, Senior Development Engineer O: (408)938-4420; mobile: (408)655-4567 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] calculating memory usage
I am comparing two different algorithms in terms of speed and memory usage. I can calculate the processing time with proc.time() as follows but am not sure how to calculate the memory usage. ptm - proc.time() x - rnorm(100) proc.time() - ptm I would like to be within R itself since I will test the algorithm several hundred times and in batch mode. So manually looking up 'top' may not be feasible. help.seach(memory) suggests memory.profile and gc but I am not sure how to use these. Sorry if this is a basic question. Thank you. Regards, Adai __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R-help
I believe .dbf files are more commonly DBase files, in which case see package RODBC. On Mon, 13 Sep 2004, Spencer Graves wrote: Did you do a search at www.r-project.org - R site search? Searching for .dbf there just now exposed a read.shape function in the maptools package. hope this helps. p.s. Did you read the posting guide! http://www.R-project.org/posting-guide.html;? Tips provided there may help you answer questions like this for yourself. Failing that, they may also help you formulate your questions so you are more likely to get useful replies. Buena suerte. Fuensanta Saura Igual wrote: Dear all, Does anyone know how to read files with .dbf extension? Thanks for your time. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] calculating memory usage
On Mon, 13 Sep 2004, Adaikalavan Ramasamy wrote: I am comparing two different algorithms in terms of speed and memory usage. I can calculate the processing time with proc.time() as follows but am not sure how to calculate the memory usage. ptm - proc.time() x - rnorm(100) proc.time() - ptm Hmm ... see ?system.time! I would like to be within R itself since I will test the algorithm several hundred times and in batch mode. So manually looking up 'top' may not be feasible. help.seach(memory) suggests memory.profile and gc but I am not sure how to use these. I don't think you can. You can find out how much memory R is using NOW, but not the peak memory usage during a calculation. Nor is that particularly relevant, as it depends on what was gone on before, the word length of the platform and the garbage collection settings. On Windows, starting in a clean session, calling gc() and memory.size(), then calling your code and memory.size(max=TRUE) will give you a fair idea, but `top' indicates some Unix-alike. -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] generalized eigenvalues - porting code using eig() from Matlab to R
Dear list, I am porting some Matlab routines to R. I am looking for the equivalent function in R for the Matlab function eig(), such that eig(A, B) quoteproduces a diagonal matrix D of generalized eigenvalues and a full matrix V whose columns are the corresponding eigenvectors so that A*V = B*V*D/quote[1]. More specifically, I want to find the eigenvalues and eigenvectors of eig(ZKZt, diag(K1)) where: ZKZt [,1] [,2] [,3] [,4] [1,] 0.024326360 -0.0087060425 -0.029307513 -0.0131484613 [2,] -0.001316161 0.0028641451 0.003249924 0.0003892546 [3,] -0.016591044 0.0061132182 0.021493284 0.0083083670 [4,] -0.006419155 -0.0002713207 0.004564305 0.0044508397 and diag(K1) [,1] [,2] [,3] [,4] [1,] 0.2307692 0.000 0.000 0.000 [2,] 0.000 0.2307692 0.000 0.000 [3,] 0.000 0.000 0.3076923 0.000 [4,] 0.000 0.000 0.000 0.2307692 How would I go about doing this in R? Thanks in advance, Gavin [1] http://www.mathworks.com/access/helpdesk/help/techdoc/ref/eig.html?cmdname=eig -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. ECRC [E] [EMAIL PROTECTED] UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way[W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] generalized eigenvalues - porting code using eig() from Matlab to R
On Mon, 13 Sep 2004, Gavin Simpson wrote: I am porting some Matlab routines to R. I am looking for the equivalent function in R for the Matlab function eig(), such that eig(A, B) quoteproduces a diagonal matrix D of generalized eigenvalues and a full matrix V whose columns are the corresponding eigenvectors so that A*V = B*V*D/quote[1]. So they are eigenvalues/vectors of B^{-1}A provided B is invertible, as in your example. More specifically, I want to find the eigenvalues and eigenvectors of eig(ZKZt, diag(K1)) where: ... -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] .Random.seed in R-devel
On Mon, 13 Sep 2004, Frank Samuelson wrote: I'm running R-2.0.0 (yesterday's snapshot)in its own directory, and everything works great, except: .Random.seed Error: Object .Random.seed not found Does 2.0.0 not use .Random.seed for saving, etc, like it says in the help page? `Like it says on the help page'! Initially, there is no seed; a new one is created from the current time when one is required. Hence, different sessions will give different simulation results, by default. '.Random.seed' is an integer vector, containing the random number generator (RNG) *state* for random number generation in R. It can be saved and restored, but should not be altered by the user. So .Random.seed does not exist until the state does. It will after runif(1). -- 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] .Random.seed in R-devel
Frank Samuelson [EMAIL PROTECTED] writes: I'm running R-2.0.0 (yesterday's snapshot)in its own directory, and everything works great, except: .Random.seed Error: Object .Random.seed not found Does 2.0.0 not use .Random.seed for saving, etc, like it says in the help page? Thanks for any help. Did you check that in any other version of R? [EMAIL PROTECTED] pd]$ R --vanilla R : Copyright 2004, The R Foundation for Statistical Computing Version 1.9.1 (2004-06-21), ISBN 3-900051-00-3 .Random.seed Error: Object .Random.seed not found Hint: Not set until needed... -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R in Linux Redhat 9.0
Hi, my name is Bryan and I just installed R on my Redhat 9.0. I imported the key from the net as directed, and tested the integreity of the rpm package- it was fine. I then went ahead and installed the i386.rpm package and the installation was carried to completion. However, now I have a hard time finding and opening R, which I just installed. Does someone know what's going on? I'm a relatively new user to linux, but I don't think I did anything wrong in term of installing the software. But I don't know. Thank you for your help, I really appreciate it. Bryan __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] .Random.seed in R-devel
Oh. I guess I had a different definition of when one is required than the help page. :) Thanks. Prof Brian Ripley wrote: `Like it says on the help page'! Initially, there is no seed; a new one is created from the current time when one is required. Hence, different sessions will give different simulation results, by default. So .Random.seed does not exist until the state does. It will after runif(1). __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R in Linux Redhat 9.0
rpm -ql R should show you your installed files. Did you try typing R? Bryan Tseng wrote: Hi, my name is Bryan and I just installed R on my Redhat 9.0. I imported the key from the net as directed, and tested the integreity of the rpm package- it was fine. I then went ahead and installed the i386.rpm package and the installation was carried to completion. However, now I have a hard time finding and opening R, which I just installed. Does someone know what's going on? I'm a relatively new user to linux, but I don't think I did anything wrong in term of installing the software. But I don't know. Thank you for your help, I really appreciate it. Bryan __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R in Linux Redhat 9.0
Hi! Just open a terminal and type 'R'. Read the R-Intro will help you a lot. Regards. On Mon, 13 Sep 2004, Bryan Tseng wrote: Hi, my name is Bryan and I just installed R on my Redhat 9.0. I imported the key from the net as directed, and tested the integreity of the rpm package- it was fine. I then went ahead and installed the i386.rpm package and the installation was carried to completion. However, now I have a hard time finding and opening R, which I just installed. Does someone know what's going on? I'm a relatively new user to linux, but I don't think I did anything wrong in term of installing the software. But I don't know. Thank you for your help, I really appreciate it. Bryan __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Ulises M. Alvarez LAB. DE ONDAS DE CHOQUE FISICA APLICADA Y TECNOLOGIA AVANZADA UNAM u-m-a-l-v-a-r-e-z AT f-a-t-a DOT u-n-a-m DOT m-x __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Measures of association for ordinal data
In a classification problem with ordinal data (classes 1 - 4), I used multidimensional optimization to maximize gamma (Goodman's measure of association) between observations and predictions. This resulted in the following frequency table (rows = observations, columns = predictions): 1 234 sum 1 16993148542721875 2 1308 01691 1203119 3 1427 14587 4346449 4289 01965 5932847 sum 20017 2 13097 1174 Predictions for class 1 are fairly good, however, classes 2 and 4 are underrepresented and class 3 is overrepresented, as shown by the marginal sums. Is there any measure of association implemented in R that takes into account the prevalence of certain classes? Thanks for your help! Christof __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spare some CPU cycles for testing lme?
On Mon, Sep 13, 2004 at 08:40:15AM -0400, Frank Samuelson wrote: If anyone has a few extra CPU cycles to spare, I'd appreciate it if you could verify a problem that I have encountered. Run the code below and tell me if it crashes your R before completion. library(lme4) data(bdf) dump-sapply( 1:5, function(i) { fm - lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf, random = ~ IQ.ver.cen | schoolNR); cat( ,i,\r) 0 }) Hi, It ran smoothly on my installation. version _ platform powerpc-apple-darwin6.8 arch powerpc os darwin6.8 system powerpc, darwin6.8 status major1 minor9.1 year 2004 month06 day 21 language R Typical lines from top (if it helps anything; around 45-50k iterations): 1225 R.bin 90.7% 2:55:12 162 1164 71.7M+ 13.7M 66.6M+ 228M+ 1225 R.bin 78.6% 3:18:27 162 1606 81.3M+ 13.7M 75.5M+ 234M+ Best, Tamas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R CMD SHLIB setup problem...
All, When I try and compile a shared library (on WinXP) I get the following error: E:\data\projR CMD SHLIB toy_dll.c Makevars:1: *** missing separator. Stop. Has someone else had this error and fixed it? This code compiles and works fine on Linux (fedora core 2). Everything was working fine under R1.8.1 but I've broken something when I upgraded to R1.9.1. So I am assuming something weird has happened in the windows paths etc. If anyone has some tips as to where to look I'd be extremely grateful. I've been through the path and environment variables etc many times but can't see where the error is. Though I realize it's likely to be staring me in the face... Thanks Toby version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major1 minor9.1 year 2004 month06 day 21 language R __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] How to show the symbol of Angstrom ?
Hi xiang li wrote: Also, I am wondering if there is any source where the expressions of many symbols are collected. Thanks you very much!!! (Assuming you mean draw the angstrom symbol on a plot ...) There are several ways: (i) Specify the character code in octal. Assuming ISO Latin 1 encoding, something like ... plot(1, type=n) text(1, 1, \305) ... or ... grid.newpage() grid.text(\305) ... should work. That should be ok on default setups for Windows and Unix. On the Mac it might have to be \201 (untested) See, e.g., http://czyborra.com/charsets/iso8859.html#ISO-8859-1 (Unix) http://www.microsoft.com/typography/unicode/1252.gif (Windows) http://kodeks.uni-bamberg.de/Computer/CodePages/MacStd.htm (Mac) for other standard symbols. (ii) Use a mathematical expression. This won't look as good because the ring and the A are not a single coherent glyph, but it should work everywhere ... plot(1, type=n) text(1, 1, expression(ring(A))) ... or ... grid.newpage() grid.text(expression(ring(A))) ... demo(plotmath) shows the range of things you can do with this approach. (iii) Use a hershey font (again, should work on all platforms and encodings) ... plot(1, type=n) text(1, 1, \\oA, vfont=c(sans serif, plain)) ... or ... grid.newpage() grid.text(\\oA, gp=gpar(fontfamily=HersheySans)) ... demo(Hershey) shows the symbols available with this approach. Hope that helps. Paul -- 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/ __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R CMD SHLIB setup problem...
On Tue, 14 Sep 2004 10:29:31 +1000, [EMAIL PROTECTED] wrote: All, When I try and compile a shared library (on WinXP) I get the following error: E:\data\projR CMD SHLIB toy_dll.c Makevars:1: *** missing separator. Stop. Has someone else had this error and fixed it? Haven't had the error, but the usual suspects are: - You're getting the wrong make. Follow the readme.packages instructions for setting up your path, and make sure make --version tells you you're running GNU Make. - Something has messed up your Makevars file. Does it look normal in a reasonable text editor? Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] as.integer(TRUE)
The fact that as.integer(TRUE) is 1 (and that for FALSE, it gives zero) is a really nice feature, eg when constructing piecewise functions (for example, as in -x*(x0)+x*(x=0)) and for many other things. Since I haven't found a reference about this, I just wanted to ask whether this is officialy part of the language or just a side effect (ie I want to know whether it is here to stay and if it is prudent to use this). Thanks Tamas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] R CMD SHLIB setup problem...
I've compared my Makevars to someone else's and we both have the same thing: CFLAGS+= -I$(RHOME)/src/gnuwin32/graphapp So I assume this is correct? (And the compiler is definitely GNU make). When I tried to recompile another bit of C code I got the following error: make: *** No rule to make target `C:/PROGRA~1/R/rw1081/src/include/R.h', needed by `filter_norm.o'. Stop. So it looks like its looking for the R 1.8.1 versions of R.h. I just can't work out why. I've dumped SET to a file and checked that nothing on the path or any of the environment variables point to the old directory. It all looks OK to me. As far as I am aware nothing here uses the windows registry so I am assuming there shouldn't be any problems there. Cheers T. -Original Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 10:58 AM To: Patterson, Toby (Marine, Hobart) Cc: [EMAIL PROTECTED] Subject: Re: [R] R CMD SHLIB setup problem... On Tue, 14 Sep 2004 10:29:31 +1000, [EMAIL PROTECTED] wrote: All, When I try and compile a shared library (on WinXP) I get the following error: E:\data\projR CMD SHLIB toy_dll.c Makevars:1: *** missing separator. Stop. Has someone else had this error and fixed it? Haven't had the error, but the usual suspects are: - You're getting the wrong make. Follow the readme.packages instructions for setting up your path, and make sure make --version tells you you're running GNU Make. - Something has messed up your Makevars file. Does it look normal in a reasonable text editor? Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] drawing on axes
Hi, I would like to make certain portions of axis lines thicker (as Tufte suggests). How can I draw on axes? I only need a couple of line segments on the left and bottom one. Thanks Tamas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Signs of loadings from princomp on Windows
I start a clean session of R 1.9.1 on Windows and I run the following code: library(MASS) data(painters) pca.painters - princomp(painters[ ,1:4]) loadings(pca.painters) Loadings: Comp.1 Comp.2 Comp.3 Comp.4 Composition 0.484 -0.376 0.784 -0.101 Drawing 0.424 0.187 -0.280 -0.841 Colour -0.381 -0.845 -0.211 -0.310 Expression 0.664 -0.330 -0.513 0.432 Comp.1 Comp.2 Comp.3 Comp.4 SS loadings 1.00 1.00 1.00 1.00 Proportion Var 0.25 0.25 0.25 0.25 Cumulative Var 0.25 0.50 0.75 1.00 However, if I rerun the same analysis, the loadings of the first component have the opposite sign (see below), why is that? I have read the note in the princomp help that says The signs of the columns of the loadings and scores are arbitrary, and so may differ between different programs for PCA, and even between different builds of R. However, I still would expect the same signs for two runs in the same session. pca.painters - princomp(painters[ ,1:4]) loadings(pca.painters) Loadings: Comp.1 Comp.2 Comp.3 Comp.4 Composition -0.484 -0.376 0.784 -0.101 Drawing -0.424 0.187 -0.280 -0.841 Colour 0.381 -0.845 -0.211 -0.310 Expression -0.664 -0.330 -0.513 0.432 Comp.1 Comp.2 Comp.3 Comp.4 SS loadings 1.00 1.00 1.00 1.00 Proportion Var 0.25 0.25 0.25 0.25 Cumulative Var 0.25 0.50 0.75 1.00 R.version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major1 minor9.1 year 2004 month06 day 21 language R BTW, I have tried the same in R 1.9.1 on Debian and I can't reproduce what I see on Windows. In fact all the runs give the same as the second run on Windows. -Francisco __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] drawing on axes
I would like to make certain portions of axis lines thicker (as Tufte suggests). How can I draw on axes? I only need a couple of line segments on the left and bottom one. How about: plot (1, 1, xlim= c (-10, 10), bty= 'n') axis (1, at= c (-10, -5), labels= FALSE, tick= T, lwd= 5, tck= 0) axis (1, at= c (0, 3), labels= FALSE, tick= T, lwd= 5, tck= 0) axis (2, at= c (0.8, 1), labels= FALSE, tick= T, lwd= 5, tck= 0) Cheers, Lorenz - Lorenz Gygax Tel: +41 (0)52 368 33 84 / [EMAIL PROTECTED] Centre for proper housing of ruminants and pigs Swiss Federal Veterinary Office __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html