Re: [R] Use of Second Monitor Question
On Thu, 21 Aug 2003, Duncan Murdoch wrote: On Thu, 21 Aug 2003 17:55:34 -0400, kjetil brinchmann halvorsen wrote: On 21 Aug 2003 at 16:51, Uwe Ligges wrote: Slightly off-topic, but: we are about to buy a data show to put up permanent in an aula. All data shows I have seen use the monitor port directly, so the monitor is blacked out. Is it possible to have a set up where I can see both on the monitor and the audience the projection? From the answer to this Q, it seems that would work well with R. Most reasonably new laptops allow the display to show in both places. (There may be limitations on the resolution to accommodate this.) The original question was about showing different things on each monitor: the console visible to the speaker, and graphics visible to the audience. I don't know of any PC laptops that do this, but I think some Macs can. At least that was my interpretation of a minor flap before a presentation at UWO where the projector showed the desktop and the laptop screen showed the stuff the audience was supposed to see. All dual-headed graphics cards can do this: modern Mac laptops have Radeons, I believe, and PC laptops with the same hardware can do the same things. My 2002 laptop with a Radeon M graphics card certainly can. -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] graphic widow overwrite
Andrew C. Ward wrote: You may prefer to use S-PLUS if it does precisely what you want. In R, you could use postscript() or pdf() to save all the graphs to a file and then view them at your leisure. There is always par(ask=TRUE) if you wanted to look at them on the screen. ... or you might want to start a new device for each plot. Uwe Ligges Regards, Andrew C. Ward CAPE Centre Department of Chemical Engineering The University of Queensland Brisbane Qld 4072 Australia [EMAIL PROTECTED] Quoting array chip [EMAIL PROTECTED]: Hi, I am running a loop to plot multiple plots. In s-plus, it shows multiple pages in the graphic window to allow checking on each plot. but in R, the next plot always overwrite the previous one, so i can only have the last plot produced, is there a way to have multiple pages in the graphic window just like S-plus does? Thanks __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Reducing matrix dimension
Thomas W Blackwell [EMAIL PROTECTED] writes: help(Subscript) Or, princomp or factanal, depending on what was meant... I have a 12(cols) by 9(rows) matrix X. I need to reduce this matrix so that it contains 'n' columns (eg. reduce X into a 3 by 9 matrix). What is the best method to do this in R? -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Problems with addition in big POSIX dates
This is simply a bug in the code that is supposed to work around these OS limitations: on some platforms mktime was resetting the wday during the computations to try to work on the timezone in force: using GMT works fine. unlist(unclass(as.POSIXlt(test.date+24*3600, GMT))) sec min hour mday mon year wday yday isdst 0 0 0 2 0 140 1 1 0 I've put a fix in for 1.8.0. I cannot reproduce Martin's result (on RH8.0 or Solaris or Windows, and that seems to indicate some other problem on that platform): perhaps MM can test under the fixed code? On Thu, 14 Aug 2003, Martin Maechler wrote: Whit == Whit Armstrong [EMAIL PROTECTED] on Wed, 13 Aug 2003 15:23:58 -0400 writes: Whit Have you noticed any problems with big dates (=1/1/2040) in R? Whit Here is the bit of code that I'm having trouble with: test.date - strptime(1/1/2040,format=%m/%d/%Y) unlist(test.date) Whit sec min hour mday mon year wday yday isdst Whit 0 0 0 1 0 140 0 0 0 date.plus.one - as.POSIXct(test.date) + 24*60*60 date.plus.one.lt - as.POSIXlt(date.plus.one) unlist(date.plus.one.lt) Whit sec min hour mday mon year wday yday isdst Whit 0 0 0 2 0 140 0 1 0 Whit Notice that wday (the weekday, 0=Sunday, 7=Saturday) doesn't change. Whit Am I missing something? Probably the C library millenium bug (not official name). The C library standard type for timedates, time_t, is usually encoded using 32-bit integers, measuring seconds since the beginning of 1970. It has been well-known for years that this will lead to integer overflow from 19 Jan 2038 : as.POSIXct(strptime(1/1/1970,format=%m/%d/%Y))+ .Machine$integer.max [1] 2038-01-19 03:14:07 CET I had thought that the R implementation carefully used doubles instead of integers everywhere, but I guess we somewhere rely on system-internal things even here. For me, on Intel- Linux (RH 7.3, newer gcc) it's even worse: unlist(date.plus.one.lt) sec min hour mday mon year wday yday isdst 0 0 0 2 0 140 6 0 0 ~ i.e. `wday' has been counted backwards, and `yday' has remained at 0. - I guess we have to wait for 64-bit implementations of time_t or write our own code that works around the many C-library-bugs we (the R community) have encountered concerning POSIX-time implementations. Prof Brian Ripley will know more on this.. Martin Maechler [EMAIL PROTECTED] http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27 ETH (Federal Inst. Technology)8092 Zurich SWITZERLAND phone: x-41-1-632-3408fax: ...-1228 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] automatic logging of commands
BDR == Prof Brian Ripley [EMAIL PROTECTED] on Thu, 21 Aug 2003 20:36:24 +0100 (BST) writes: BDR On Thu, 21 Aug 2003, David R. Bickel wrote: The piping UNIX command that I just suggested is better than nothing, but writes backspaces or other invisible characters to the file, sometimes in place of characters that were visible on the screen. BDR Under actual UNIX, that is not so: the characters in BDR the file are those sent to the terminal. Perhaps your BDR terminal does things you do not expect. BDR Many decent UNIX terminal windows allow you to save BDR their contents, BTW. Some kind of R command that writes everything that appears on the screen to a file would be better. BDR You can always contribute one (see the R startup BDR banner). Not that I think this is the job of a BDR statistics package under UNIX, when other tools exist: BDR you might also like to investigate ESS under Emacs, BDR which can I believe do what you want. Definitely. Just write the *R* buffer to a file (C-x C-w) even continuing using it. Use ESS! would have been my answer to the original question. Martin Maechler [EMAIL PROTECTED] http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] gam step in grasper
hello, some weeks ago I asked if there is an equivalent of step(lm) for gam, and Simon Wood informed me that there isn't but it will eventually be done. Now I found grasp.step.gam {grasper} and wonder if it would be possible to rewrite/extract (? I don't now how it is called or how it works - I am not experienced in programming) this command for the use outside GRASP-R. Perhaps this way is less work intensive but of course this command doesn't use GCV/UBRE scores but anova. Is there an argument not to use this function inside GRASP-R even though it's purpose is not spatial? thanks for your help, cheers Martin __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Re: Oja median
A report on my Oja Median problem: Gabor Grothendieck suggested replacing my loopy cofactor function with: cofactors2 - function(x) { x - t(rbind(1,cbind(x,1))) p - nrow(x) solve( x, (seq(p)==p)+0) * det(x) } Which is much better, especially if the dimension p is large. Unfortunately, it is still quite slow inside the apply loop of the main function, and this suggests that it is probably necessary to recode in C or Fortran to get something that would work well in realistic problems. In case anyone else would like to play with this...here is the original version again and a timing comparison: mean.wilks - function(x){ # Computes the column means of the matrix x -- very slwly. n - dim(x)[1] p - dim(x)[2] A - t(combn(1:n,p)) X - NULL for(i in 1:p) X - cbind(X,x[A[,i],]) oja.ize - function(v)cofactors(matrix(v,sqrt(length(v A - t(apply(X,1,oja.ize)) coef(lm(-A[,1]~A[,-1]-1)) } cofactors - function(A){ B - rbind(1,cbind(A,1)) p - ncol(B) x - rep(0,p) for(i in 1:p) x[i] - ((-1)^(i+p)) *det(B[-i,-p]) return(x) } __ X - matrix(rnorm(150),50) t1 - unix.time(mean.wilks(X)-m1) t2 - unix.time(mean.wilks2(X)-m2) # this uses cofactors2 t3 - unix.time(apply(X,2,mean)-m3) m1 A[, -1]1A[, -1]2A[, -1]3 0.09205914 0.05603060 -0.24290857 m2 A[, -1]1A[, -1]2A[, -1]3 0.09205914 0.05603060 -0.24290857 m3 [1] 0.09205914 0.05603060 -0.24290857 t1 [1] 147.70 25.33 173.41 0.00 0.00 t2 [1] 108.97 21.87 131.23 0.00 0.00 t3 [1] 0 0 0 0 0 NB. A reminder that this mean version is only a testing ground for the median version of Oja which replaces the lm() call with a median regression call. url:www.econ.uiuc.edu/~roger/my.htmlRoger Koenker email [EMAIL PROTECTED] Department of Economics vox:217-333-4558University of Illinois fax:217-244-6678Champaign, IL 61820 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] a pickle (solved first part now need r's from data)
On Friday, August 22, 2003, at 01:44 AM, John Christie wrote: I predicted that y would increase as x increased. However, I only made the prediction on the ranks of the scores. The ranks don't correlate with predicted. And, I don't think a regression on the ranks is warranted. However, the actual scores do yield a significant slope for b, and a significant R^2 using a linear regression (y is the value and x is the predicted rank). What should my argument be here? Should I have endorsed using the actual scores instead of ranks to begin for some reason that doesn't have anything to do with my current result? :) OK, now I realize that I should probably not have been correlating ranks in the first place because my real data may have had a non-linear, but still steadily increasing, slope. The ranks would tend to increase variance where the slope was low and ruined my chance of finding an effect. Oh, on another note, I can use rcorr to get the Spearman correlations, but I'd like to be able to just add the ranks as a column. I was going to just use order and add a simple factor. But, that doesn't deal with ties correctly. still don't have these yet. And, I also wanted to analyze correlations subject by subject and compare my two groups. However, there doesn't seem to be a good way to get this. I tried using by with cor. However, this requires binding x and y which causes cor to return a matrix (if you could pass it x and y separate it would just return a number). given data frame s x y subj 4 7 harry 5 1 harry 6 9 harry 2 4 steve 3 7 steve ... i'd like to be able to produce r subj .12 harry .52 steve ... any tips? __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] bootstrapping nlme fits (was boot function)
First, this has very little to do with boot: PLEASE use an infromative subject line. You need to work out how to resample in this situation: are you resampling subjects or observations? If you are resampling subjects, you need to create a data frame containing just the resampled subjects and pass that to nlme. However, you also need to think if this is valid. If you resample subjects, you will be fitting subjects twice or more as if they are independent. I know of no theoretical studies on resampling mixed-effects models, and urge you to look for such results. On Fri, 22 Aug 2003, Brunschwig, Hadassa {PDMM~Basel} wrote: I skimmed through the archives and couldnt really find an answer to my question. It's not an R question. One thing i dont understand of the description of the function boot() is the second variable for statistics. I have a sample of say 19 subjects out of these, using boot(), i would like to generate say 1000 samples. For these 1000 samples ill calculate an nlme() and ill use these 1000 estimators of a variable to make further calculation. Whether this is valid most likely depends on what those calculations are. Now what i dont understand is where the index should be set. the nlme() looks like this: nlme(Concentr~a*(1-exp(Day*(log(0.1,base=exp(1))/exp(logt09 ,data=data ,fixed=a+logt09~1 ,random=a+logt09~1|Subject[ind] ,start=list(fixed=c(a=30,logt09=1))) My idea was to put the index ( second variable of the statistcs function) What that variable means depends on the other arguments to boot, and you haven't told us what those are. in the subject as i want to generate different samples of subjects. I get the error that the vector ind was not found. I would be happy for any help concerning this problem. -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] means comparison with seasonal time series?
Dear R list, I have a sequence of weekly observations of number of adults and larvae in various size classes from a butterfly population living in a subtropical area with pronounced wet and dry seasons. Wet and dry seasons are each defined 26 weeks long with fixed start and end dates. The data span 103 weeks (two seasons each of wet and dry) with some missing weeks. What I would like to do is compare means of each type of observation between wet and dry seasons (Does the number of adults observed vary by season?). Not surprisingly there is pronounced autocorrelation in the data, e.g.: dwtest(lm(numadults ~ week)) gives DW = 0.2727, p-value = 2.2e-16 Note that the effects of this autocorrelation extend across wet-dry and dry-wet boundaries. What would be a way to ask my questions in R? It seems like I'd use nlme and define a corStruct, but it's unclear to me how I'd do that. I'm still learning R (and statistics) so detailed answers would be most appreciated. Sincerely, Douglas Scofield Department of Biology [EMAIL PROTECTED]University of Miami off: (305) 284-3778 P.O. Box 249118 fax: (305) 284-3039 Coral Gables, FL 33124-0421 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] bootstrapping nlme fits (was boot function)
On Fri, 22 Aug 2003 14:39:28 +0100 (BST) Prof Brian Ripley [EMAIL PROTECTED] wrote: First, this has very little to do with boot: PLEASE use an infromative subject line. You need to work out how to resample in this situation: are you resampling subjects or observations? If you are resampling subjects, you need to create a data frame containing just the resampled subjects and pass that to nlme. However, you also need to think if this is valid. If you resample subjects, you will be fitting subjects twice or more as if they are independent. I know of no theoretical studies on resampling mixed-effects models, and urge you to look for such results. On Fri, 22 Aug 2003, Brunschwig, Hadassa {PDMM~Basel} wrote: Hadassa - You may want to look at the slightly simpler generalized least squares with correlated observations case. For that I have a bootstrap option in the Design packages's glsD function (which uses the nlme package). There is an option to treat multiply-sampled subjects as if they were different subjects, or to pool them into one larger subject (I think the former is more correct but I haven't gotten very far in this thinking). You can do simulations with glsD to check the performance of the cluster-sampling bootstrap in this situation. I have done limited simulations and bootstrap variance estimates seem to be close to actual values, although not as close as information-matrix-based estimates when the model is true. glsD attempts to implement the cluster bootstrap fairly efficiently, although it does not yet work for the case where an across-time covariance pattern is not assumed. Frank Harrell I skimmed through the archives and couldnt really find an answer to my question. It's not an R question. One thing i dont understand of the description of the function boot() is the second variable for statistics. I have a sample of say 19 subjects out of these, using boot(), i would like to generate say 1000 samples. For these 1000 samples ill calculate an nlme() and ill use these 1000 estimators of a variable to make further calculation. Whether this is valid most likely depends on what those calculations are. Now what i dont understand is where the index should be set. the nlme() looks like this: nlme(Concentr~a*(1-exp(Day*(log(0.1,base=exp(1))/exp(logt09 ,data=data ,fixed=a+logt09~1 ,random=a+logt09~1|Subject[ind] ,start=list(fixed=c(a=30,logt09=1))) My idea was to put the index ( second variable of the statistcs function) What that variable means depends on the other arguments to boot, and you haven't told us what those are. in the subject as i want to generate different samples of subjects. I get the error that the vector ind was not found. I would be happy for any help concerning this problem. -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help --- Frank E Harrell Jr Prof. of Biostatistics Statistics Div. of Biostatistics Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] problem compiling R in suse8.2
Hi I'm trying to compile R in SuSE 8.2 (updated with the gcc 3.3.1) but I'm getting the following error: /usr/X11R6/include/X11/keysymdef.h:1181:2: invalid preprocessing directive #d make[4]: *** [dataentry.lo] Error 1 make[4]: Leaving directory `/usr/local/src/compile/R-1.7.1/src/modules/X11' make[3]: *** [R] Error 2 make[3]: Leaving directory `/usr/local/src/compile/R-1.7.1/src/modules/X11' make[2]: *** [R] Error 1 make[2]: Leaving directory `/usr/local/src/compile/R-1.7.1/src/modules' make[1]: *** [R] Error 1 make[1]: Leaving directory `/usr/local/src/compile/R-1.7.1/src' make: *** [R] Error 1 Can someone give a hint on this ? Thanks EJ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Your help plz - (statistical problem)
Have you considered nls and / or optim? hope this helps. spencer graves K.V.ANANTHA PADMANABHA wrote: Hi David, Please help me out to resolve the following statistical problem. For the following data X Y 021.5 021.78 0.03 21.5 0.09 16.3 0.27 9.9 0.81 6.13 2.43 5.17 How to put the logistic curve was fitted for the following model C Y = -- (1 + (X/X0)^b) Where Y is the total no. of juveniles per parent animals alive at the end of the test and X is the concentartion. C = the expected no. of juveniles when X = 0 X0 = the EC50 in the population b = the slope parameter I expect the results as early as possible. Thanks regards K.V.Anantha Padmanabha Rallis India Limited __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] MAIL DELIVERY NOTIFICATION
Dear Internet Email User, this is an automated mail delivery notification, because your email has not been delivered the usual way. Your mail was not deliverd for the following reason: Your mail contained an attachment with the filename extension pif Since such content may contain viruses or other dangerous code it was blocked by the firewall. Best regards, Your GeNUGate Mail Gateway = ENVELOPE INFORMATION = FROM = [EMAIL PROTECTED] RCPT = [EMAIL PROTECTED] = HEADER INFORMATION = Received: from OEMCOMPUTER (80.11.47.17) by (smtprelay) with ESMTP Fri Aug 22 18:37:02 2003. From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Thank you! Date: Fri, 22 Aug 2003 18:36:52 +0200 X-MailScanner: Found to be clean Importance: Normal X-Mailer: Microsoft Outlook Express 6.00.2600. X-MSMail-Priority: Normal X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=_NextPart_000_0244F2A4 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] bootstrapping nlme fits (was boot function)
On 22 Aug 2003 at 10:18, Frank E Harrell Jr wrote: The following danish web page http://www.dina.dk/phd/s/s2/s2pr1.htm gives an example of bootstrapping nlme models. If what they are doing is vali, I don't know, I abstained from it since I do not understand it. Kjetil Halvorsen On Fri, 22 Aug 2003 14:39:28 +0100 (BST) Prof Brian Ripley [EMAIL PROTECTED] wrote: First, this has very little to do with boot: PLEASE use an infromative subject line. You need to work out how to resample in this situation: are you resampling subjects or observations? If you are resampling subjects, you need to create a data frame containing just the resampled subjects and pass that to nlme. However, you also need to think if this is valid. If you resample subjects, you will be fitting subjects twice or more as if they are independent. I know of no theoretical studies on resampling mixed-effects models, and urge you to look for such results. On Fri, 22 Aug 2003, Brunschwig, Hadassa {PDMM~Basel} wrote: Hadassa - You may want to look at the slightly simpler generalized least squares with correlated observations case. For that I have a bootstrap option in the Design packages's glsD function (which uses the nlme package). There is an option to treat multiply-sampled subjects as if they were different subjects, or to pool them into one larger subject (I think the former is more correct but I haven't gotten very far in this thinking). You can do simulations with glsD to check the performance of the cluster-sampling bootstrap in this situation. I have done limited simulations and bootstrap variance estimates seem to be close to actual values, although not as close as information-matrix-based estimates when the model is true. glsD attempts to implement the cluster bootstrap fairly efficiently, although it does not yet work for the case where an across-time covariance pattern is not assumed. Frank Harrell I skimmed through the archives and couldnt really find an answer to my question. It's not an R question. One thing i dont understand of the description of the function boot() is the second variable for statistics. I have a sample of say 19 subjects out of these, using boot(), i would like to generate say 1000 samples. For these 1000 samples ill calculate an nlme() and ill use these 1000 estimators of a variable to make further calculation. Whether this is valid most likely depends on what those calculations are. Now what i dont understand is where the index should be set. the nlme() looks like this: nlme(Concentr~a*(1-exp(Day*(log(0.1,base=exp(1))/exp(logt09 ,data=data ,fixed=a+logt09~1 ,random=a+logt09~1|Subject[ind] ,start=list(fixed=c(a=30,logt09=1))) My idea was to put the index ( second variable of the statistcs function) What that variable means depends on the other arguments to boot, and you haven't told us what those are. in the subject as i want to generate different samples of subjects. I get the error that the vector ind was not found. I would be happy for any help concerning this problem. -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help --- Frank E Harrell Jr Prof. of Biostatistics Statistics Div. of Biostatistics Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Passwords for RODBC package
Is there a way to make the RODBC package prompt for a password on the odbcConnect(db,uid=user1) call? I'd prefer not to have to use the pwd= parameter as this is saved in .RHISTORY and .RDATA. Is there a convenient way to provide the password as a variable and have the variable automatically deleted before .RDATA is saved? Thanks in advance. = Bruce Moore __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Passwords for RODBC package
Use odbcDriverConnect. On Fri, 22 Aug 2003, Bruce Moore wrote: Is there a way to make the RODBC package prompt for a password on the odbcConnect(db,uid=user1) call? I'd prefer not to have to use the pwd= parameter as this is saved in .RHISTORY and .RDATA. Is there a convenient way to provide the password as a variable and have the variable automatically deleted before .RDATA is saved? -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Problem running RTERM via SSH on Windows/2000
This is the documented behaviour for R when used non-interactively. Presumably your `SSH' (probably really openssh) isn't using terminals for input and output. You might like to try rterm --ess, a kludge for a similar problem in NTemacs. Or try a different ssh (a real Windows one, not one designed for systems with ptys). On Fri, 22 Aug 2003, Bruce Moore wrote: I'm having problems getting RTERM to work via SSH. Whenever it has any type of problem, it abends instead of issuing an error message and returning to the prompt. Both server and client are Windows/2000 Professional at FP4. SSH is via Cygwin on both sides. R is version is 1071. RTERM runs fine when run in a BASH shell on the server, though it does not prompt for --save --nosave or --vanilla. It never does: no version of R prompts for those to my knowledge. -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Package Reference Manuals
Is it possible for the average user to generate the latex version of the table of contents page that appears in the Package Reference Manuals on the CRAN website? Or is this (yet another) a Viennese speciality? url:www.econ.uiuc.edu/~roger/my.htmlRoger Koenker email [EMAIL PROTECTED] Department of Economics vox:217-333-4558University of Illinois fax:217-244-6678Champaign, IL 61820 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] means comparison with seasonal time series?
Douglas - Your question is a bit beyond the scope of this list. It's really at a level appropriate for an advanced graduate student who is already doing a thesis in the area of time series data. Best thing is to see whether you can find some consulting help from a local statistics department. - tom blackwell - u michigan medical school - ann arbor - On Fri, 22 Aug 2003, Douglas G. Scofield wrote: Dear R list, I have a sequence of weekly observations of number of adults and larvae in various size classes from a butterfly population living in a subtropical area with pronounced wet and dry seasons. Wet and dry seasons are each defined 26 weeks long with fixed start and end dates. The data span 103 weeks (two seasons each of wet and dry) with some missing weeks. What I would like to do is compare means of each type of observation between wet and dry seasons (Does the number of adults observed vary by season?). Not surprisingly there is pronounced autocorrelation in the data, e.g.: dwtest(lm(numadults ~ week)) gives DW = 0.2727, p-value = 2.2e-16 Note that the effects of this autocorrelation extend across wet-dry and dry-wet boundaries. What would be a way to ask my questions in R? It seems like I'd use nlme and define a corStruct, but it's unclear to me how I'd do that. I'm still learning R (and statistics) so detailed answers would be most appreciated. Sincerely, Douglas Scofield Department of Biology [EMAIL PROTECTED]University of Miami off: (305) 284-3778 P.O. Box 249118 fax: (305) 284-3039 Coral Gables, FL 33124-0421 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Altix IA-64 chip
We have a loan SGI Altix system runing linux with the IA-64 chip. I was wondering if anybody has compiled R in such a system. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Substitute in legend
I tried to use substitute in legend as follows: pval - 0.04 plot(0) legend(1,0.5,substitute(hat(theta) == p, list(p = pval))) For some reason the legend is repeated 3 times. Any suggestions or is this a bug? __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] advise for modeling a linear mixed model
Dear R help-list reader, I'm trying to investigate my data with linear mixed model and are seeking advise how to write the model in R. I was trying to get hold of the recommended book from Bates et al, but neither the major bookshop nor our university library had the book. My data is mirroring the example given in the appendix of John Foxes book Applied Regression with a small exception. I'm interested in a frequency (freq) of a particular cell type which was measured longitudinal in patients (p) and control group (c). In addition, each sample was measured four times (repeat) with a possible factor influencing the sensitivity (gated). Here my data frame: ID freqday repeat group gated 1 0.1 1 1 c 1 1 0.151 2 c 12000 1 0.2 1 3 c 5 1 0.1 1 4 c 12000 1 0.5 12 1 c 12000 1 0.1 12 2 c 5 1 0.2 12 3 c 10 1 0.4 12 4 c 7 1 0.2 5 1 p 15000 2 0.255 2 p 6000 2 . 2 . So I could write a model with a fixed effects for day and group and their interaction. lme(freq ~ day*group, random = ~day | ID data=frame) I'm expecting possible effect of gated on the frequency. I don't know how to include the fact that I have four measures from the same sample and an effect of the variable gated on the frequency. I'm appreciate any help, and apologize in case I have not read carefully the available documentation. Frank -- Frank Mattese-mail: [EMAIL PROTECTED] Department of Virology fax 0044(0)207 8302854 Royal Free Hospital and tel 0044(0)207 8302997 University College Medical School London __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Thank you
Thank you for your email. I appreciate you taking the time to keep me informed of your opinions and the issues that are important to you. Your comments help keep me informed as we strive to make California a better place in which to work and live. Your email has been directed to members of my staff who assist constituents and report ideas and concerns daily. If your concern is best handled by a specific department, your correspondence will be forwarded for action and response. So that we can keep track of correspondence and ensure that we are able to respond to California residents, please be sure to include your name and address when you communicate with the Governor\'s Office or any state agency. Please note that we do NOT accept email attachments, so your correspondence should be included within the text of your email. Again, thank you for sharing your thoughts. An informed and engaged citizenry is essential to the democratic process, and I appreciate your willingness to write me. Sincerely, Governor Gray Davis __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] bootstrapping nlme fits (was boot function)
On Fri, 22 Aug 2003 12:36:28 -0400 kjetil brinchmann halvorsen [EMAIL PROTECTED] wrote: On 22 Aug 2003 at 10:18, Frank E Harrell Jr wrote: The following danish web page http://www.dina.dk/phd/s/s2/s2pr1.htm gives an example of bootstrapping nlme models. If what they are doing is vali, I don't know, I abstained from it since I do not understand it. Kjetil Halvorsen Thanks. I use the unconditional bootstrap which does not assume a correlation structure and does not use residuals. Frank On Fri, 22 Aug 2003 14:39:28 +0100 (BST) Prof Brian Ripley [EMAIL PROTECTED] wrote: First, this has very little to do with boot: PLEASE use an infromative subject line. You need to work out how to resample in this situation: are you resampling subjects or observations? If you are resampling subjects, you need to create a data frame containing just the resampled subjects and pass that to nlme. However, you also need to think if this is valid. If you resample subjects, you will be fitting subjects twice or more as if they are independent. I know of no theoretical studies on resampling mixed-effects models, and urge you to look for such results. On Fri, 22 Aug 2003, Brunschwig, Hadassa {PDMM~Basel} wrote: Hadassa - You may want to look at the slightly simpler generalized least squares with correlated observations case. For that I have a bootstrap option in the Design packages's glsD function (which uses the nlme package). There is an option to treat multiply-sampled subjects as if they were different subjects, or to pool them into one larger subject (I think the former is more correct but I haven't gotten very far in this thinking). You can do simulations with glsD to check the performance of the cluster-sampling bootstrap in this situation. I have done limited simulations and bootstrap variance estimates seem to be close to actual values, although not as close as information-matrix-based estimates when the model is true. glsD attempts to implement the cluster bootstrap fairly efficiently, although it does not yet work for the case where an across-time covariance pattern is not assumed. Frank Harrell I skimmed through the archives and couldnt really find an answer to my question. It's not an R question. One thing i dont understand of the description of the function boot() is the second variable for statistics. I have a sample of say 19 subjects out of these, using boot(), i would like to generate say 1000 samples. For these 1000 samples ill calculate an nlme() and ill use these 1000 estimators of a variable to make further calculation. Whether this is valid most likely depends on what those calculations are. Now what i dont understand is where the index should be set. the nlme() looks like this: nlme(Concentr~a*(1-exp(Day*(log(0.1,base=exp(1))/exp(logt09 ,data=data ,fixed=a+logt09~1 ,random=a+logt09~1|Subject[ind] ,start=list(fixed=c(a=30,logt09=1))) My idea was to put the index ( second variable of the statistcs function) What that variable means depends on the other arguments to boot, and you haven't told us what those are. in the subject as i want to generate different samples of subjects. I get the error that the vector ind was not found. I would be happy for any help concerning this problem. -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help --- Frank E Harrell Jr Prof. of Biostatistics Statistics Div. of Biostatistics Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help --- Frank E Harrell Jr Prof. of Biostatistics Statistics Div. of Biostatistics Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Altix IA-64 chip
Isaac Neuhaus [EMAIL PROTECTED] writes: We have a loan SGI Altix system runing linux with the IA-64 chip. I was wondering if anybody has compiled R in such a system. Seems so...: http://buildd.debian.org/fetch.php?pkg=r-basever=1.7.1.cvs.20030814-1arch=ia64stamp=1060920704file=logas=raw -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Substitute in legend
[EMAIL PROTECTED] writes: I tried to use substitute in legend as follows: pval - 0.04 plot(0) legend(1,0.5,substitute(hat(theta) == p, list(p = pval))) For some reason the legend is repeated 3 times. Any suggestions or is this a bug? It's a bug. The code is looking at length(legend), but that is not the number of legends when mode call objects are concerned. A workaround is legend(1,0.5,as.expression(substitute(hat(theta) == p, list(p = pval -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Package Reference Manuals
It seems that I can get (almost) what I want using the utility R CMD Rd2dvi packagename url:www.econ.uiuc.edu/~roger/my.htmlRoger Koenker email [EMAIL PROTECTED] Department of Economics vox:217-333-4558University of Illinois fax:217-244-6678Champaign, IL 61820 On Fri, 22 Aug 2003, Roger Koenker wrote: Is it possible for the average user to generate the latex version of the table of contents page that appears in the Package Reference Manuals on the CRAN website? Or is this (yet another) a Viennese speciality? url: www.econ.uiuc.edu/~roger/my.htmlRoger Koenker email [EMAIL PROTECTED] Department of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Champaign, IL 61820 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Substitute in legend
On Friday 22 August 2003 16:35, Peter Dalgaard BSA wrote: [EMAIL PROTECTED] writes: I tried to use substitute in legend as follows: pval - 0.04 plot(0) legend(1,0.5,substitute(hat(theta) == p, list(p = pval))) For some reason the legend is repeated 3 times. Any suggestions or is this a bug? It's a bug. The code is looking at length(legend), but that is not the number of legends when mode call objects are concerned. A workaround is legend(1,0.5,as.expression(substitute(hat(theta) == p, list(p = pval Just out of curiosity: ?legend says legend: a vector of text values or an 'expression' of length = 1 to appear in the legend. Is an object of mode call either ? (is.expression() returns FALSE.) Are they expected to work wherever expressions are supposed to work ? Deepayan __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Substitute in legend
Deepayan Sarkar [EMAIL PROTECTED] writes: legend(1,0.5,as.expression(substitute(hat(theta) == p, list(p = pval Just out of curiosity: ?legend says legend: a vector of text values or an 'expression' of length = 1 to appear in the legend. Is an object of mode call either ? (is.expression() returns FALSE.) Are they expected to work wherever expressions are supposed to work ? No, yes. They're not text nor expressions (so technically there's no bug), but it is easier to construct them with substitute() and they do generally work like expressions of length 1 in graphs. -- 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://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] problem compiling R in suse8.2
Ernesto Jardim wrote: Hi I'm trying to compile R in SuSE 8.2 (updated with the gcc 3.3.1) but I'm getting the following error: Works fine on my SuSE 8.2 box. [EMAIL PROTECTED]:~/ gcc -vgcc -v ... gcc version 3.3 20030226 (prerelease) (SuSE Linux) [EMAIL PROTECTED]:~ uname -a Linux kryten 2.4.20-4GB-athlon #1 Fri Jul 11 20:16:51 UTC 2003 i686 unknown unknown GNU/Linux /usr/X11R6/include/X11/keysymdef.h:1181:2: invalid preprocessing directive #d make[4]: *** [dataentry.lo] Error 1 make[4]: Leaving directory `/usr/local/src/compile/R-1.7.1/src/modules/X11' make[3]: *** [R] Error 2 make[3]: Leaving directory `/usr/local/src/compile/R-1.7.1/src/modules/X11' make[2]: *** [R] Error 1 make[2]: Leaving directory `/usr/local/src/compile/R-1.7.1/src/modules' make[1]: *** [R] Error 1 make[1]: Leaving directory `/usr/local/src/compile/R-1.7.1/src' make: *** [R] Error 1 Maybe an XFree86-devel library? [EMAIL PROTECTED]:~ rpm -q -a | grep X XFree86-fonts-75dpi-4.3.0-15 XFree86-fonts-scalable-4.3.0-15 XFree86-man-4.3.0-15 XFree86-server-4.3.0-15 XFree86-devel-4.3.0-15 XFree86-GLX-4.3.0-15 XFree86-4.3.0-15 XFree86-libs-4.3.0-42 ... Hope it helps Cheers Jason -- Indigo Industrial Controls Ltd. 64-21-343-545 [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Substitute in legend
On Fri, 22 Aug 2003, Deepayan Sarkar wrote: Just out of curiosity: ?legend says legend: a vector of text values or an 'expression' of length = 1 to appear in the legend. Is an object of mode call either ? (is.expression() returns FALSE.) Are they expected to work wherever expressions are supposed to work ? They aren't expressions, but they do work in many places where expressions work, in particular in plotmath. This is good, because quote() is shorter than expression(). -thomas __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] converting factor to numeric
On 21 Aug 2003 at 20:40, kjetil brinchmann halvorsen wrote: After some private responses I did what I should have done at beginning, opened S Programming at page 15. It is much clearer than the FAQ, which I think is slighly misleading. Kjetil Halvorsen Hola! The R FAQ says: 7.12 How do I convert factors to numeric? It may happen that when reading numeric data into R (usually, when reading in a file), they come in as factors. If f is such a factor object, you can use as.numeric(as.character(f)) to get the numbers back. More efficient, but harder to remember, is as.numeric(levels(f))[as.integer(f)] In any case, do not call as.numeric() or their likes directly. But trying to follow the advice: (this is without package method attached, but the results are the same with): First doing as one shouldn't: table( as.numeric(EdadC) ) 1 2 3 4 5 20 99 157 127 74 Doing as the FAQ says: table( as.numeric(as.character(EdadC)) ) character(0) Warning message: NAs introduced by coercion or: table( as.numeric(levels(EdadC))[as.integer(EdadC)] ) character(0) Warning message: NAs introduced by coercion ? Kjetil Halvorsen __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help