Re: [R] png scaling problem
If you have not already tried it try creating a fig file: xfig(myfile.fig) plot(1:10) dev.off() and then using the fig2dev utility (find it via google) to convert it to a tiff: fig2dev -L tiff myfile.fig myfile.tiff On 9/2/05, Knut Krueger [EMAIL PROTECTED] wrote: Probably a better first question is, why are you using a bitmapped graphics format if you need the image to be re-scaled? I need a 1000 dpi tif file in a size of appr. 10 to 10 cm for applied animal behaviour science: http://authors.elsevier.com/GuideForAuthors.html?PubID=503301dc=GFA images to one of the following formats (Note the resolution requirements for line drawings, halftones, and line/halftone combinations given below.): EPS: Vector drawings. Embed the font or save the text as graphics. TIFF: Colour or greyscale photographs (halftones): always use a minimum of 300 dpi. TIFF: Bitmapped line drawings: use a minimum of 1000 dpi. TIFF: Combinations bitmapped line/half-tone (colour or greyscale): a minimum of 500 dpi is required. DOC, XLS or PPT: If your electronic artwork is created in any of these Microsoft Office applications please supply as is. I tired the Postscript file but the file is double heigh as width i do not know why. The problem was already discussed in the tread: [R] High resolution plots I have to send the images possibly yesterday and I am looking fo a suitable solution since two months now. I tired gsview with converting to all possible Tiff formats but the images appear not in color and in a strange black and white way Some readers are able to read it (Windows Image view) other not and I do not know which reader the journal will use :-( And the ylab is too small ... http://biostatistic.de/temp/1.tif http://biostatistic.de/temp/2.tif http://biostatistic.de/temp/3.tif http://biostatistic.de/temp/4.tif In general, bitmapped graphics do not resize well, though if you have a specific need and know a target image size, you can adjust various parameters to look decent. Are you going to view these images in a web browser, where you are concerned with display size and resolution? From your e-mail headers it appears you are on Windows. If you need a re-sizable graphic, use a vector based format such as wmf/emf, especially if you need the graphics embedded in a Windows application such as Word or Powerpoint. This is the default format under Windows when copying and pasting a graphic between applications. You can then, fairly freely, resize the image in the target application as you may require. If you are going to print the graphic directly or include it in a document for printing (as opposed to just viewing it), then use PDF or Postscript. Ok there is a second description for the file format :-( http://authors.elsevier.com/ArtworkInstructions.html?dc=AI2 there are pdf formats welcome but with defined conditions: Maybe anybody could give me a hint to get the files in the recommendet format. I will ask them immediately which whether the pdf is allowed or not, becaus they have two different instruction sites :-( Regards Knut __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] post hoc analysis after anova
Mahdi Osman m_osm at gmx.net writes: I fit a linear model lm and then did anova. My idea is to run multiple pairwise comparision for several factor Package multcomp helps you here, and also protects you against overdoing it. Dieter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Calculating Goodman-Kurskal's gamma using delta method
Dear list, I have a problem on calculating the standard error of Goodman-Kurskal's gamma using delta method. I exactly follow the method and forumla described in Problem 3.27 of Alan Agresti's Categorical Data Analysis (2nd edition). The data I used is also from the job satisfaction vs. income example from that book. job - matrix(c(1, 3, 10, 6, 2, 3, 10, 7, 1, 6, 14, 12, 0, 1, 9, 11), nrow = 4, ncol = 4, byrow = TRUE, dimnames = list(c( 15,000, 15,000 - 25,000, 25,000 - 40,000, 40,000), c(VD, LD, MS, VS))) The following code is for calculating gamma value, which is consistent with the result presented in section 2.4.5 of that book. C - 0 D - 0 for (i in 1:nrow(job)){ for (j in 1:ncol(job)){ pi_c - 0 pi_d - 0 for (h in 1:nrow(job)){ for (k in 1:ncol(job)){ if ((h i k j) | (h i k j)){ pi_c - pi_c + job[h, k]/sum(job) } if ((h i k j) | (h i k j)){ pi_d - pi_d + job[h, k]/sum(job) } } } C - C + job[i, j] * pi_c D - D + job[i, j] * pi_d } } gamma - (C - D) / (C + D) # gamma = 0.221 for this example. The following code is for calculating stardard error of gamma. sigma.squared - 0 for (i in 1:nrow(job)){ for (j in 1:ncol(job)){ pi_c - 0 pi_d - 0 for (h in 1:nrow(job)){ for (k in 1:ncol(job)){ if ((h i k j) | (h i k j)){ pi_c - pi_c + job[h, k]/sum(job) } if ((h i k j) | (h i k j)){ pi_d - pi_d + job[h, k]/sum(job) } } } phi - 4 * (pi_c * D - pi_d * C) / (C + D)^2 sigma.squared - sigma.squared + phi^2 } } se - (sigma.squared/sum(job))^.5 # 0.00748, which is different from the SE 0.117 given in section 3.4.3 of that book. I am not able to figure out what is the problem with my code... Could anyone point out what the problem is? Thanks. Wuming __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R binaries, platform independent and Design of Experiments
a) The sources are available and really easy to compile on all those operating systems. Honestly, I only know how to compile my Java programs. Anyway, we have been able to work out how to download all files http://cran.au.r-project.org/. The entire CRAN is 5.4GB. This requires two DVDs!. b) You do NOT want to do numerical computations on software available in Java byte code. You do not want to do heavy numerical computations with R either. Most statistical calculation using R requires a fraction of a second and I cannot see a real difference between say 0.05 second and 0.07 second. NKN. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] More block diagonal matrix construction code
hi Bert, List well now seems a good time to adduce adiag() of package magic. Function adiag binds together arrays of arbitrary dimension corner-to-corner. Sensible interpretation is made for arguments at the edge of acceptability (eg one array being a scalar). The meat of the code is as follows: adiag - function(a,b,pad=0){ s - array(pad, dim.a + dim.b) s - do.call([-, c(list(s), lapply(dim.a, seq.new), list(a))) ind - lapply(seq(dim.b), function(i) seq.new(dim.b[[i]]) + dim.a[[i]]) out - do.call([-, c(list(s), ind, list(b))) return(out) } where seq.new - function(i) { if (i == 0) { return(NULL)} else { return (1:i) } } [NB: untested]. so it creates an array s of the right size filled with pad, and then fills one corner with a, then fills the other corner with b. Note the absence of any for() loops. Hope this is useful rksh On 2 Sep 2005, at 00:08, Berton Gunter wrote: Folks: In answer to a query, Andy Liaw recently submitted some code to construct a block diagonal matrix. For what seemed a fairly straightforward task, the code seemed a little overweight to me (that's an American stock analyst's term, btw), so I came up with a slightly cleaner version (with help from Andy): bdiag-function(...){ mlist-list(...) ## handle case in which list of matrices is given if(length(mlist)==1)mlist-unlist(mlist,rec=FALSE) csdim-rbind(c(0,0),apply(sapply(mlist,dim),1,cumsum )) ret-array(0,dim=csdim[length(mlist)+1,]) add1-matrix(rep(1:0,2),nc=2) for(i in seq(along=mlist)){ indx-apply(csdim[i:(i+1),]+add1,2,function(x)x[1]:x[2]) ## non-square matrix if(is.null(dim(indx)))ret[indx[[1]],indx[[2]]]-mlist[[i]] ## square matrix else ret[indx[,1],indx[,2]]-mlist[[i]] } ret } I doubt that there's any noticeable practical performance difference, of course. The strategy is entirely basic: just get the right indices for replacement of the arguments into a matrix of 0's of the right dimensions. About the only thing to notice is that the apply() construction returns either a list or matrix depending on whether a matrix is square or not (a subtlety that tripped me up in my first version of this code). I would be pleased if this stimulated others to come up with cleverer/more elegant approaches that they would share, as it's the sort of thing that I'll learn from and find useful. Cheers to all, Bert Gunter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting- guide.html -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R binaries, platform independent and Design of Experiments
Nam-Ky Nguyen wrote: a) The sources are available and really easy to compile on all those operating systems. Honestly, I only know how to compile my Java programs. Anyway, we have Oh dear, I only know how to compile my C programs, and I never read the docs when something has to be compiled with Java. So we have a problem now, since you have not read the docs on compiling R. been able to work out how to download all files http://cran.au.r-project.org/. The entire CRAN is 5.4GB. This requires two DVDs!. The sources of base R are in one file with 12 Mb and it's not that hard to say ./configure make make install is it? Looks like you have to look for some other software than R. Uwe Ligges b) You do NOT want to do numerical computations on software available in Java byte code. You do not want to do heavy numerical computations with R either. Most statistical calculation using R requires a fraction of a second and I cannot see a real difference between say 0.05 second and 0.07 second. NKN. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] question sur R
hello I've tried to simulate a normal law, like that : X1 = c(rnorm(90,50,5583),rnorm(160,1198,13034597),rnorm(40,13,125)) then, I've regressed my ordinal polytomic variable rating rating=c(rep(2,90),rep(3,160), rep(4,40)) rating = as.factor(rating) rating = as.ordered(rating) (ratins is an ordered factor) on the continuous variable X1 like that library(MASS) test2 = polr(rating ~ X1, method = c(probit)) summary(test2) but R indicates me the following error whereas X does not have infinite or missing values? Re-fitting to get Hessian Error in svd(X) : infinite or missing values in x THANKS good by abdelhafid berrichi [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Linux Standalone Server Suggestions for R
I think I remember reading somewhere that using Sun Studio compiler generates binaries that run faster than those built using GCC. Presumably this performance gain is increased if the Sun Fortran 95 compiler is used. Whether the substantial cost of Sun Studio is money better spent than that on extra RAM or bigger processors is not something I can answer. HTH Phineas Pikounis, Bill [CNTUS] [EMAIL PROTECTED] 09/01/05 10:18 PM Jia-Shing, I missed your original message, but would like to reiterate Bogdan's comments and suggestions. In a former life, a colleague of mine led the way for us to construct a small farm of Opteron servers that all had 2 AMD64 CPU's, SUSE Enterprise Server OS, and the ability to have up to 16GB RAM. We experimented with clustering them but that was not successful, and for practical purposes, not necessary. Penguin computing (http://www.penguincomputing.com) provided us very reliable products, solutions, and service, and I am sure there are other vendors just as capable. As Bogdan mentioned, search the r-help archives for various discussions on this over the past few years. With $50K US, you likely will come up more computing power than you can dream of (for now at least :-). That can get you multiple 16GB 2CPU machines, I believe. Good luck! Hope that helps, Bill --- Bill Pikounis, PhD Nonclinical Statistics Centocor, Inc. -Original Message- From: bogdan romocea [mailto:[EMAIL PROTECTED] Sent: Thursday, September 01, 2005 2:54 PM To: [EMAIL PROTECTED] Cc: R-help@stat.math.ethz.ch Subject: Re: [R] Linux Standalone Server Suggestions for R Most powerful in what way? Quite a lot depends on the jobs you're going to run. - To run CPU-bound jobs, more CPUs is better. (Even though R doesn't do threading, you can manually split some CPU-bound jobs in several parts and run them simultaneously.) Apart from multiple CPUs and hyperthreading, check the new dual-core CPUs. - To run very large jobs, more memory is better. You can easily spend most of your money on memory. Get the fastest one. - You should get 64-bit CPUs, otherwise you won't be able to run very large jobs (search the list for details). I would suggest that you buy a configuration that can handle more CPUs and memory than you think you need now (say, at least 4 max CPUs and 16 GB max memory), then keep on adding more memory and CPUs as your needs change. hth, b. -Original Message- From: Jia-Shing So [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 31, 2005 10:03 PM To: r-help@stat.math.ethz.ch Cc: Phuoc Hong Subject: [R] Linux Standalone Server Suggestions for R Hi All, My group is looking for any suggestions on what to purchase to achieve the most powerful number crunching system that $50k can buy. The main application that will be used is R so input on what hardware benefits R most will be appreciated. The requirements are that it be a single standalone server (i.e. not a cluster solution), and it that must be able to run unix/linux. If anyone has any experience/ suggestions regarding the following questions that would also be greatly appreciated. AMD vs Intel chips, especially 64-bit versions of the two? Using Itanium/Opterons and if so how much of a performance boost did you achieve vs other 64-bit chip sets? Also, does anyone know if there is an upper thresh hold on much memory R can use? Thanks in advance for any help and suggestions, Jia-Shing So Programmer Analyst Biostatistics and Bioinformatics Lab University of California, San Diego __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R binaries, platform independent and Design of Experiments
On 02/09/05, Nam-Ky Nguyen [EMAIL PROTECTED] wrote: b) You do NOT want to do numerical computations on software available in Java byte code. You do not want to do heavy numerical computations with R either. Most statistical calculation using R requires a fraction of a second and I cannot see a real difference between say 0.05 second and 0.07 second. NKN. It is my understanding that the problem with Java is that it wasn't written with serious numerical computation in mind - as far as I know only in the latest version have Sun started to be address this issue. The byte code for the java virtual machine has a flawed numerical model which is not fully compliant with the IEEE754 standard - this has nothing to do with speed of computation. Furthermore the integer model is very restrictive when you want to work on random numbers using bit-twiddling. cheers! Sean __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] y-axis intercept
Hi, Is there any way to enforce the plot so that it draws the y-axis intercepting the x-axis at zero. Thanks in advance, Sam. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] y-axis intercept
On Fri, 2 Sep 2005 11:07:40 +0100 Samuel E. Kemp wrote: Hi, Is there any way to enforce the plot so that it draws the y-axis intercepting the x-axis at zero. I'm not sure what exactly you want, maybe setting ylim or yaxs or both? For example: plot(1:10, xlim = c(0, 10.5), ylim = c(0, 10.5), xaxs = i, yaxs = i) see also ?par for more information. Z Thanks in advance, Sam. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Reference manual is not available in the help menu of the rgui
Dear R list, I have installed R 2.1.1 for Windows. In the help menu of the Rgui I can load all manuals except the reference manual. I downloaded the reference manual from the cran-site separately and saved it into the same folder as the other manuals but still it is not available in the menu. How can I solve this problem? Thank your for the help __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Reference manual is not available in the help menu of the rgui
Alvarez Pedro [EMAIL PROTECTED] writes: Dear R list, I have installed R 2.1.1 for Windows. In the help menu of the Rgui I can load all manuals except the reference manual. I downloaded the reference manual from the cran-site separately and saved it into the same folder as the other manuals but still it is not available in the menu. How can I solve this problem? Thank your for the help Would you really want to read that cover to cover? Everything in it is available via the on-line help system. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Gamma for ordinal trends
Wuming Gong [EMAIL PROTECTED] writes: Is it possible to use delta method to evaluate the standard error of Goodman-Kruskal gamma and then Wald test to evaluate the significance of association? Wuming Probably better to actually read the paper(s) by GoodmanKruskal (JASA(1972), vol.67, 415--421, c). AFAICS, that basically *is* the delta method, but you'd likely want a score test, not a Wald test (i.e. calculate the variance under the null). On 31 Aug 2005 13:42:27 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Jonathan Baron [EMAIL PROTECTED] writes: On 08/31/05 17:46, Wuming Gong wrote: Dear list, Are there any functions for calculating gamma (and its standard error), which measures the association of ordinal factors in I x J contingency table. I did a RSiteSearch but did not find any clues... You have to look for Goodman-Kruskal gamma. It is a bit obscure. It is rcorr.cens in the Hmisc package. The significance test is the same as for Kendall's tau, according to some books. Well, it would be if we handled ties in Kendall's tau correctly... I don't know about standard error. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Reference manual is not available in the help menu of the rgui
Alvarez Pedro wrote: Dear R list, I have installed R 2.1.1 for Windows. In the help menu of the Rgui I can load all manuals except the reference manual. I downloaded the reference manual from the cran-site separately and saved it into the same folder as the other manuals but still it is not available in the menu. How can I solve this problem? Re-install, and this time check the box to install that manual. But as Peter says, it's not really very useful, it's just a collection of man pages from the base packages. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Reference manual is not available in the help menu of the rgui
Actually, I've started reading the reference manual... :-) I printed it out 2-to-a-page and I'm working my way through it, in order to learn about the full capabilities of the base system... I know I'm not going to remember everything, but when I bump into a particular problem, I'll know what type of solutions to use and what sort of keywords to search for... frequently the problem with help is knowing that vital keyword when I in my ignorant non-statistician way want to use another vocabularly... :-) cheers! Sean On 02/09/05, Duncan Murdoch [EMAIL PROTECTED] wrote: Alvarez Pedro wrote: Dear R list, I have installed R 2.1.1 for Windows. In the help menu of the Rgui I can load all manuals except the reference manual. I downloaded the reference manual from the cran-site separately and saved it into the same folder as the other manuals but still it is not available in the menu. How can I solve this problem? Re-install, and this time check the box to install that manual. But as Peter says, it's not really very useful, it's just a collection of man pages from the base packages. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Multivariate Skew Normal distribution
(Ted Harding) wrote: On 01-Sep-05 Caio Lucidius Naberezny Azevedo wrote: Hi all, Could anyone tell me if there is any package (or function) that generates values from a multivariate skew normal distribution? Thanks all, Caio Hello, Caio Please tell us what you mean by skew normal distribution. Since normal (i.e. gaussian) distributions are not skew, you Well, but then somebody (Azzalini?) coined the term skew-normal, which you can read about athttp://azzalini.stat.unipd.it//SN or simply do library(help=sn) # after installing from CRAN. This family is obtained by skewing a normal family, hence the name. You can also skew a t -family or whatever other symmetric family you like. I found this usefull for modelling. Kjetil presumably mean something different from what you said, so unless we understand this more clearly it is unlikely that anyone can make a suggestion which would meet your needs. With best wishes, Ted. E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861 Date: 01-Sep-05 Time: 15:02:37 -- XFMail -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Calculating Goodman-Kurskal's gamma using delta method
Wuming Gong wrote: Dear list, I have a problem on calculating the standard error of Goodman-Kurskal's gamma using delta method. I exactly follow the method and forumla described in Problem 3.27 of Alan Agresti's Categorical Data Analysis (2nd edition). The data I used is also from the job satisfaction vs. income example from that book. job - matrix(c(1, 3, 10, 6, 2, 3, 10, 7, 1, 6, 14, 12, 0, 1, 9, 11), nrow = 4, ncol = 4, byrow = TRUE, dimnames = list(c( 15,000, 15,000 - 25,000, 25,000 - 40,000, 40,000), c(VD, LD, MS, VS))) The following code is for calculating gamma value, which is consistent with the result presented in section 2.4.5 of that book. C - 0 D - 0 for (i in 1:nrow(job)){ for (j in 1:ncol(job)){ pi_c - 0 pi_d - 0 for (h in 1:nrow(job)){ for (k in 1:ncol(job)){ if ((h i k j) | (h i k j)){ pi_c - pi_c + job[h, k]/sum(job) } if ((h i k j) | (h i k j)){ pi_d - pi_d + job[h, k]/sum(job) } } } C - C + job[i, j] * pi_c D - D + job[i, j] * pi_d } } gamma - (C - D) / (C + D) # gamma = 0.221 for this example. The following code is for calculating stardard error of gamma. sigma.squared - 0 for (i in 1:nrow(job)){ for (j in 1:ncol(job)){ pi_c - 0 pi_d - 0 for (h in 1:nrow(job)){ for (k in 1:ncol(job)){ if ((h i k j) | (h i k j)){ pi_c - pi_c + job[h, k]/sum(job) } if ((h i k j) | (h i k j)){ pi_d - pi_d + job[h, k]/sum(job) } } } phi - 4 * (pi_c * D - pi_d * C) / (C + D)^2 sigma.squared - sigma.squared + phi^2 } } se - (sigma.squared/sum(job))^.5 # 0.00748, which is different from the SE 0.117 given in section 3.4.3 of that book. I am not able to figure out what is the problem with my code... Could anyone point out what the problem is? Thanks. Wuming Save your time (and much execution time) by using the Hmisc package's rcorr.cens function with the argument outx=TRUE. rcorr.cens using a standard U-statistic variance estimator. -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Reference manual is not available in the help menu of the rgui
On 9/2/2005 8:59 AM, Alvarez Pedro wrote: Re-install, and this time check the box to install that manual. But as Dear Mr. Murdoch, thank you for the answer, apparently there is no other solution than a re-installation. ... or downloading it from CRAN, as you did. Duncan Murdoch Peter says, it's not really very useful, it's just a collection of man pages from the base packages. ... I want to have the reference manual only because my eyes like it more to read pdfs then text in the console (and with the search function I am as quickly as in the other case). __ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem
Gabor Grothendieck schrieb: If you have not already tried it try creating a fig file: xfig(myfile.fig) plot(1:10) dev.off() and then using the fig2dev utility (find it via google) to convert it to a tiff: fig2dev -L tiff myfile.fig myfile.tiff Error:: fig2def: broken pipe ghostscript aborted? command was gs -q -dSAFER -sDEVICE=tiff24nc -r80 -g3830x506 -sOutputFile=44.tif __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem
Knut, Gabor has provided a possible approach here. Your comments on using postscript make me wonder how your code looked. The following, for example, will create a 4 inch by 4 inch square plot to an encapsulated postscript file (EPS). It will also specify/include required resources for the Helvetica font, which is one of the requirements on the page you reference. Since Helvetica is one of the standard Adobe PS fonts, I don't believe that it is necessary to actually embed the font here, which would be the case if you used a non-standard font. If you open the EPS file in a text editor, you will see many lines referring to 'Resources' and fonts. postscript(RPlot.eps, onefile = FALSE, horizontal = FALSE, paper = special, height = 4, width = 4, family = Helvetica, font = Helvetica) barplot(1:10) dev.off() They keys above are the 'onefile', 'horizontal' and 'paper' arguments, which must be set as above to generate an EPS file with the specified size and bounding box. The page referenced mentions creating the image as close as possible to the actual size required, so be sure to set the 'height' and 'width' arguments per that specification. Using postscript here will also better enable the 50% reduction that is mentioned, given the vector based format here. The key here also is to be sure that the plot looks good in the target format, not on the screen, which includes text size, readability and positioning, etc. HTH, Marc Schwartz On Fri, 2005-09-02 at 02:03 -0400, Gabor Grothendieck wrote: If you have not already tried it try creating a fig file: xfig(myfile.fig) plot(1:10) dev.off() and then using the fig2dev utility (find it via google) to convert it to a tiff: fig2dev -L tiff myfile.fig myfile.tiff On 9/2/05, Knut Krueger [EMAIL PROTECTED] wrote: Probably a better first question is, why are you using a bitmapped graphics format if you need the image to be re-scaled? I need a 1000 dpi tif file in a size of appr. 10 to 10 cm for applied animal behaviour science: http://authors.elsevier.com/GuideForAuthors.html?PubID=503301dc=GFA images to one of the following formats (Note the resolution requirements for line drawings, halftones, and line/halftone combinations given below.): EPS: Vector drawings. Embed the font or save the text as graphics. TIFF: Colour or greyscale photographs (halftones): always use a minimum of 300 dpi. TIFF: Bitmapped line drawings: use a minimum of 1000 dpi. TIFF: Combinations bitmapped line/half-tone (colour or greyscale): a minimum of 500 dpi is required. DOC, XLS or PPT: If your electronic artwork is created in any of these Microsoft Office applications please supply as is. I tired the Postscript file but the file is double heigh as width i do not know why. The problem was already discussed in the tread: [R] High resolution plots I have to send the images possibly yesterday and I am looking fo a suitable solution since two months now. I tired gsview with converting to all possible Tiff formats but the images appear not in color and in a strange black and white way Some readers are able to read it (Windows Image view) other not and I do not know which reader the journal will use :-( And the ylab is too small ... http://biostatistic.de/temp/1.tif http://biostatistic.de/temp/2.tif http://biostatistic.de/temp/3.tif http://biostatistic.de/temp/4.tif In general, bitmapped graphics do not resize well, though if you have a specific need and know a target image size, you can adjust various parameters to look decent. Are you going to view these images in a web browser, where you are concerned with display size and resolution? From your e-mail headers it appears you are on Windows. If you need a re-sizable graphic, use a vector based format such as wmf/emf, especially if you need the graphics embedded in a Windows application such as Word or Powerpoint. This is the default format under Windows when copying and pasting a graphic between applications. You can then, fairly freely, resize the image in the target application as you may require. If you are going to print the graphic directly or include it in a document for printing (as opposed to just viewing it), then use PDF or Postscript. Ok there is a second description for the file format :-( http://authors.elsevier.com/ArtworkInstructions.html?dc=AI2 there are pdf formats welcome but with defined conditions: Maybe anybody could give me a hint to get the files in the recommendet format. I will ask them immediately which whether the pdf is allowed or not, becaus they have two different instruction sites :-( Regards Knut __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!
Re: [R] png scaling problem
but back to the last problem, what could be wrong that the ylab is not displayed as expected? with regards Knut __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem
Knut Krueger schrieb: Ok there is a second description for the file format :-( http://authors.elsevier.com/ArtworkInstructions.html?dc=AI2 there are pdf formats welcome but with defined conditions: Maybe anybody could give me a hint to get the files in the recommendet format. I will ask them immediately which whether the pdf is allowed or not, becaus they have two different instruction sites :-( This one is genarally for elsvier journals, but if there is a special description in the journal page, authors must use this ... means: EPS: Vector drawings. Embed the font or save the text as graphics. TIFF: Colour or greyscale photographs (halftones): always use a minimum of 300 dpi. TIFF: Bitmapped line drawings: use a minimum of 1000 dpi. TIFF: Combinations bitmapped line/half-tone (colour or greyscale): a minimum of 500 dpi is required. with regards Knut Krueger -- with regards Knut Krueger http://www.biostatistic.de __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Finding all overlaps between two sets of 1-Dimensional regions
I have a simply defined regions ([start,end] where startend). I have two large sets of them and want to find all regions in the first that overlap any regions in the second. The closest I could find by searching is overlap.owin in I can do this by looping, but there is likely a better way to do this. Any suggestions? Thanks, Sean __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] The Perils of PowerPoint
Hi all, Below is a URL for an editorial published today in our local newspaper, the Minneapolis StarTribune. It was originally published in the Washington Post a couple of days ago: http://www.washingtonpost.com/wp-dyn/content/article/2005/08/29/AR2005082901444.html but that site requires registration. The 'Strib site seems to be open for the moment: http://www.startribune.com/stories/1519/5591930.html I thought folks might find it interesting. Best regards, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem
I can't reproduce this problem. It works fine for me. Some possibilities are: 1. check which version of fig2dev you are using. If you are on Windows I am using the fig2dev that comes in winfgi142.zip by Andreas Schmidt found at: http://user.cs.tu-berlin.de/~huluvu/WinFIG.htm Here is the version info I get: C:\binfig2dev -h | findstr Windows Windows version 2 (02/08/2004) by Andreas Schmidt 2. Also, it seems from your output that fig2dev uses ghostscript. I am using ghostscript 8.13. Check what version you are using. On 9/2/05, Knut Krueger [EMAIL PROTECTED] wrote: Gabor Grothendieck schrieb: If you have not already tried it try creating a fig file: xfig(myfile.fig) plot(1:10) dev.off() and then using the fig2dev utility (find it via google) to convert it to a tiff: fig2dev -L tiff myfile.fig myfile.tiff Error:: fig2def: broken pipe ghostscript aborted? command was gs -q -dSAFER -sDEVICE=tiff24nc -r80 -g3830x506 -sOutputFile=44.tif __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Pseudo-Voigt fit
Dear colleagues, thank you very much for help. I have got the most efficient message (?nls) from Bert Gunter and I took off from there and now the routine is up and running with results validated and doing exactly what SigmaPlot did. It required intense ...reading the [EMAIL PROTECTED] manual as Spencer suggests below, but it was worth of the effort! I am actually amazed how easily - in many cases - one can find the right segment in the documentation even after only partial reading of all those pages. But sometimes even the real ingenuity of designers in naming all those functions cannot switch on that intuition radar to navigate where one would like (or has to) be. Mea maxima culpa Thanks again. Petr P. Dr. Petr Pancoska Department of Pathology SUNY Stony Brook, NY 11794 phone: (631)-444-3030 ** This e- mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by e-mail and destroy all copies of the original. ** Spencer Graves [EMAIL PROTECTED] df.comTo [EMAIL PROTECTED] 09/01/2005 10:17 cc PMr-help@stat.math.ethz.ch Subject Re: [R] Pseudo-Voigt fit I haven't seen a reply to this question, so I will attempt a few remarks in spite of some confusion about what you are asking. 1. The function to use for parameter estimation depends on ths structure of the data. My all-around preference for many purposes is for optim, but I've used nls, fitdistr (in the MASS package) and others in different circumstances. 2. If you are doing nonlinear estimation with, e.g., optim, I suggest you request hessian=TRUE. The eigenvalues of the hessian will tell you if it is ill conditioned. If it is, you might consider reparameterizing the model. 3. I try to avoid using reserved words like c. R can often determine what you want from the context, but there are exceptions. I try to avoid that problem by testing a name at a command prompt before I use it. If it returns, object not found, I'm fine; if not, I try something different. 4. Following the posting guide! http://www.R-project.org/posting-guide.html; can on average increase the likelihood that you will receive helpful suggestions quickly. (I've learned that people rarely respond to my incoherent screams; when they do, it's rarely helpful. I've reluctantly learned that there is often no substutute for reading the [EMAIL PROTECTED] manual.) I'd be shocked if this answered your question, but I hope it is helpful nonetheless. spencer graves [EMAIL PROTECTED] wrote: Hi, I am sorry for this question, but I am trying to speed up an application I will need to fit many x-y data sets (input from text files) to 4-parameter Pseudo-Voigt peak function. Until now I used SigmaPlot macro to do it (enclosed just in case...) peaksign(q) = if(total(q)q[1], 1, -1) xatymin(q,r) = xatymax(q,max(r)-r) [Parameters] a = if(peaksign(y)0, max(y), min(y)) ''Auto {{previous: 60.8286}} b = fwhm(x,abs(y))/2 ''Auto {{previous: 0.656637}} c = .5 ''Auto {{previous: 6.82973e-010}} x0 = if(peaksign(y)0, xatymax(x,y), xatymin(x,y)) ''Auto {{previous: 3.19308}} [Equation] f = a*(c*(1/(1+((x-x0)/b)^2))+(1-c)*exp(-0.5*((x-x0)/b)^2)) fit f to y (manageable for ~100), but it looks like the next project would need to process ~1000 member sets. I am not as familiar with R to find the right info (although I can use R in general). I am also nearly sure that there should be a solution to this task out there ready to be modified... Could you be so kind and direct me please to the right package
Re: [R] 3d cube with labels along axes
This may work: - use option axes=F in persp - use locator() to get the coordinates where you want to put your new labels - use text(x,y,...) to write your new labels It is a little bit tedious, but it should work. Regards, Felipe jonne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi R-users, I would like to draw a cube with a grid on it and labels along all three axes. I have trouble printing the labels correctly. My best attempt is described below. Can somebody explain me how I can change the 0,20,40,80,100 along the x axis into character vectors like no, light, intermediate, severe ? x - seq(0, 100, length=10) #x - c(no, light, intermediate, severe) y - x f - function(x,y) { numeric(length=100) + 5 } z - outer(x, y, f) P - persp(x, y, z, theta=30, phi=30, zlim=c(-10,10), ticktype=detailed) text3d(0, 0, -10, Hello world, P) Thanks in advance, Jonne. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem
On Fri, 2005-09-02 at 15:08 +0200, Knut Krueger wrote: but back to the last problem, what could be wrong that the ylab is not displayed as expected? with regards Knut The TIF files seem to be OK. However, the PNG files, as a result of your attempt to scale the plot, do not have enough margin space for side = 2 (left). You would need to adjust the settings for par(mar) and perhaps adjust the overall plot size in the png() call. This is one of the reasons why trying to scale a bitmapped image is problematic. If you want to have finer control over the text annotation, use something like the following: # Create just the 'bare' barplot and save the bar # midpoints in 'mp' mp - barplot(1:10, xaxt = n, yaxt = n, ann = FALSE) # Now create the x axis labels, using 'mp' for placement # 'cex' controls text size. # See ?axis for more details axis(1, at = mp, labels = LETTERS[1:10], cex = 1.25) # Do the same for the y axis axis(2, at = seq(0, 10, 2), cex = 1) # Do the x axis label, using mtext() # See ?mtext mtext(1, line = 3, text = X Axis Label, cex = 1.5) # Same for y axis mtext(2, line = 2.5, text = y Axis Label, cex = 1.5) # Now the title mtext(3, line = 2, text = Main Barplot Title, cex = 4) Again, with the above, be sure to check the output in the target format, not on the screen. They will not always be the same. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Finding all overlaps between two sets of 1-Dimensional regions
maybe something like this could work in your case: set1 - t(apply(matrix(rnorm(20), 10, 2), 1, sort)) set2 - t(apply(matrix(rnorm(10), 5, 2), 1, sort)) set1. - apply(set1, 1, rev) apply(set2, 1, function(x) apply(set1. = x, 2, any)) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/336899 Fax: +32/16/337015 Web: http://www.med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: Sean Davis [EMAIL PROTECTED] To: r-help r-help@stat.math.ethz.ch Sent: Friday, September 02, 2005 3:17 PM Subject: [R] Finding all overlaps between two sets of 1-Dimensional regions I have a simply defined regions ([start,end] where startend). I have two large sets of them and want to find all regions in the first that overlap any regions in the second. The closest I could find by searching is overlap.owin in I can do this by looping, but there is likely a better way to do this. Any suggestions? Thanks, Sean __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Reference manual is not available in the help menu of the rgui
Sean O'Riordain writes: Actually, I've started reading the reference manual... :-) I printed it out 2-to-a-page and I'm working my way through it, Ah! This reminds me of the `good old days', reading the Emacs manual, Emacs lisp manual, Gnu C library manual, The payoff came in the section giving the meaning of the C library error codes: EGREGIOUS means `You did *what*?'. :-) -- Bjørn-Helge Mevik __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem
thx I will try it ... think I will be newbie in R for the next 10 jears ... And I don't know why wh choosed the only journal which don't want pdf files :-( __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Reference manual is not available in the help menu of the rgui
[EMAIL PROTECTED] (Bjørn-Helge Mevik) writes: Sean O'Riordain writes: Actually, I've started reading the reference manual... :-) I printed it out 2-to-a-page and I'm working my way through it, Ah! This reminds me of the `good old days', reading the Emacs manual, Emacs lisp manual, Gnu C library manual, The payoff came in the section giving the meaning of the C library error codes: EGREGIOUS means `You did *what*?'. :-) I actually have a huge list of those. Among the better ones: ECHERNOBYL Broken pipe EFLAT String out of range EGAD Surely you jest EH Canadian user error EIEIO Bug, bug here, bug bug there ENIXON Tape problem ENODICEError in rand EZ Had been faster on paper (Report from Usenix 1986, EUUG Newsletter) -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem - solved :-)
Gabor Grothendieck schrieb: I can't reproduce this problem. It works fine for me. Some possibilities are: 1. check which version of fig2dev you are using. If you are on Windows I am using the fig2dev that comes in winfgi142.zip by Andreas Schmidt found at: http://user.cs.tu-berlin.de/~huluvu/WinFIG.htm Here is the version info I get: C:\binfig2dev -h | findstr Windows Windows version 2 (02/08/2004) by Andreas Schmidt I have Windows version 2.1 (11/08/2004) by Andreas Schmidt 2. Also, it seems from your output that fig2dev uses ghostscript. I am using ghostscript 8.13. Check what version you are using. 8.51 but the most easy solution was the link to winfig - Now I need three systems to convert the files ?!? ghostscript fig2dev and winfig but it works fine :-) I will write down this solution in our forum ( If the paper is submitted) and will post you the link. If anybody else will need the same you could post only the link ;-) thx Knut __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to fit the partial association model with R?
If I do not make a mistake,the partial association model is an extension of log-linear model.I read a papers which gives an example of it.(Sloane and Morgan,1996,An Introduction to Categorical Data Analysis,Annual Review of Sociology.22:351-375) Can R fit such partial association model? ps:Another somewhat off-topic question.What's the motivations to use log-linear model?Or why use log-linear model?I learn the log-linear model butI still do not master the the advantage of the model.thank you! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] under sample problem
Hello, I have a problem to treat my data. I seek the orders being able to treat under sampling: I have X samples divided into 10. How to take, in a random way, under sample from the 1st sample, and in addition, one under sample of the 2nd sample, and so on to X to calculate the average taxonomic richness of the selection. Then I would like to know how to renew the experiment by taking this time 2, 3... X under samples at the same time, always in a random way. Thank you in advance for your answer. Manue. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R package for ICA
Hi, Which R packages are good to be used for independent component analysis? Thanks for any suggestions. Ran [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] C-index : typical values
I am doing some coxPH model fitting and would like to have some idea about how good the fits are. Someone suggested to use Frank Harrell's C-index measure. As I understand it, a C-index 0.5 indicates a useful model. I am probably making an error here because I am getting values less than 0.5 on real datasets. Can someone tell me where I am going wrong please ? Here is an example using the German Breast Study Group data available in the mfp package. The predictors in the model were selected by stepAIC(). library(Design); library(Hmisc); library(mfp); data(GBSG) fit - cph( Surv( rfst, cens ) ~ htreat + tumsize + tumgrad + posnodal + prm, data=GBSG, x=T, y=T ) val - validate.cph( fit, dxy=T, B=200 ) round(val, 3) index.orig training test optimism index.corrected n Dxy -0.377 -0.383 -0.370 -0.013 -0.364 200 R2 0.1400.148 0.1320.016 0.124 200 Slope 1.0001.000 0.9250.075 0.925 200 D 0.0280.030 0.0270.004 0.025 200 U -0.001 -0.001 0.002 -0.002 0.002 200 Q 0.0290.031 0.0250.006 0.023 200 1) Am I correct in assuming C-index = 0.5 * ( Dxy + 1 ) ? 2) If so, I am getting 0.5*(-0.3634+1) = 0.318 for the C-index. Does this make sense ? 3) Should I be using some other measurement instead of C-index. Thank you very much in advance. Regards, Adai __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] source package linking problem under linux
I'm having some problems in installing some source packages under linux. As an example, MCMCpack. An error is raised when linking: install.packages(MCMCpack) [...] * Installing *source* package 'MCMCpack' ... checking for C++ compiler default output file name... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking ieeefp.h usability... no checking ieeefp.h presence... no checking for ieeefp.h... no checking for trunc... no configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -I/usr/lib/R/include-DSCYTHE_COMPILE_DIRECT -DSCYTHE_NO_RANGE -c distributions.cc -o distributions.o [...etc. etc. All compilations are ok] g++ -o MCMCpack.so distributions.o ide.o la.o lecuyer.o MCMCdistn.o MCMCdynamicEI.o MCMCfactanal.o MCMCfcds.o MCMChierEI.o MCMCirt1d.o MCMClogit.o MCMCmetrop1R.o MCMCmixfactanal.o MCMCmnlMH.o MCMCmnlslice.o MCMCoprobit.o MCMCordfactanal.o MCMCpanel.o MCMCpoisson.o MCMCprobit.o MCMCprobitres.o MCMCregress.o MCMCrng.o MCMCtobit.o mersenne.o optimize.o rng.o smath.o stat.o -L/usr/lib/R/lib -lR /usr/lib/gcc-lib/i486-linux/3.3.5/../../../crt1.o(.text+0x18): In function `_start': ../sysdeps/i386/elf/start.S:98: undefined reference to `main' collect2: ld returned 1 exit status make: *** [MCMCpack.so] Error 1 ERROR: compilation failed for package 'MCMCpack' I don't know why it searches a reference to 'main'... Antonio, Fabio Di Narzo. version _ platform i386-pc-linux-gnu arch i386 os linux-gnu system i386, linux-gnu status major2 minor1.1 year 2005 month06 day 20 language R __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem - solved :-)
Yet another Windows solution without winfig: 1. Create a postscript image in R 2. Open this image in Ghostscript 3. Select a reasonable resolution using Display Settings in ghostscript 4. Copy the image via clipboard into your favorite image viewer (e.g. IrfanView) 5. Save the image in the required format. Thomas P. PS: But the supermost ;-) flexible tool to perform such tasks is, of course, ImageMagick. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] source package linking problem under linux
Antonio, Fabio Di Narzo [EMAIL PROTECTED] writes: I'm having some problems in installing some source packages under linux. As an example, MCMCpack. An error is raised when linking: install.packages(MCMCpack) [...] * Installing *source* package 'MCMCpack' ... checking for C++ compiler default output file name... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking ieeefp.h usability... no checking ieeefp.h presence... no checking for ieeefp.h... no checking for trunc... no configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -I/usr/lib/R/include-DSCYTHE_COMPILE_DIRECT -DSCYTHE_NO_RANGE -c distributions.cc -o distributions.o [...etc. etc. All compilations are ok] g++ -o MCMCpack.so distributions.o ide.o la.o lecuyer.o MCMCdistn.o MCMCdynamicEI.o MCMCfactanal.o MCMCfcds.o MCMChierEI.o MCMCirt1d.o MCMClogit.o MCMCmetrop1R.o MCMCmixfactanal.o MCMCmnlMH.o MCMCmnlslice.o MCMCoprobit.o MCMCordfactanal.o MCMCpanel.o MCMCpoisson.o MCMCprobit.o MCMCprobitres.o MCMCregress.o MCMCrng.o MCMCtobit.o mersenne.o optimize.o rng.o smath.o stat.o -L/usr/lib/R/lib -lR /usr/lib/gcc-lib/i486-linux/3.3.5/../../../crt1.o(.text+0x18): In function `_start': ../sysdeps/i386/elf/start.S:98: undefined reference to `main' collect2: ld returned 1 exit status make: *** [MCMCpack.so] Error 1 ERROR: compilation failed for package 'MCMCpack' I don't know why it searches a reference to 'main'... Presumably because it thinks that MCMCpack.so is supposed to be a standalone binary. (Compilers don't read filname suffixes...) There would seem to be something missing in that command line, -shared if my memory serves me. Now *why* that happens is a bit hard to figure out. Your version info below is not quite sufficient; which linux distribution is it? Did you compile R itself from sources? Antonio, Fabio Di Narzo. version _ platform i386-pc-linux-gnu arch i386 os linux-gnu system i386, linux-gnu status major2 minor1.1 year 2005 month06 day 20 language R __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] The Perils of PowerPoint
The R relevance here might be that all the statistics in the world wrongly applied to data will only bury its information content...R and Powerpoint (and Matlab and Perl and...) are all terrific tools for turning data into knowledge, but tools DO NOT relieve us of the necessity of thinking about and analyzing the meaning of the data with our intellect as well. It is wrong to blame ANY tool for our own shortcomings! My two cents, Rob - Original Message - From: Marc Schwartz [EMAIL PROTECTED] To: R-Help r-help@stat.math.ethz.ch Sent: Friday, September 02, 2005 8:18 AM Subject: [R] The Perils of PowerPoint Hi all, Below is a URL for an editorial published today in our local newspaper, the Minneapolis StarTribune. It was originally published in the Washington Post a couple of days ago: http://www.washingtonpost.com/wp-dyn/content/article/2005/08/29/AR2005082901444.html but that site requires registration. The 'Strib site seems to be open for the moment: http://www.startribune.com/stories/1519/5591930.html I thought folks might find it interesting. Best regards, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] glm p-values on features
Dear list, does anyone know how to get p-values on the coefficients returned by glm? thanks+greets, Joost __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] source package linking problem under linux
02 Sep 2005 18:15:22 +0200, Peter Dalgaard [EMAIL PROTECTED]: Antonio, Fabio Di Narzo [EMAIL PROTECTED] writes: I'm having some problems in installing some source packages under linux. As an example, MCMCpack. An error is raised when linking: install.packages(MCMCpack) [...] * Installing *source* package 'MCMCpack' ... checking for C++ compiler default output file name... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking ieeefp.h usability... no checking ieeefp.h presence... no checking for ieeefp.h... no checking for trunc... no configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -I/usr/lib/R/include-DSCYTHE_COMPILE_DIRECT -DSCYTHE_NO_RANGE -c distributions.cc -o distributions.o [...etc. etc. All compilations are ok] g++ -o MCMCpack.so distributions.o ide.o la.o lecuyer.o MCMCdistn.o MCMCdynamicEI.o MCMCfactanal.o MCMCfcds.o MCMChierEI.o MCMCirt1d.o MCMClogit.o MCMCmetrop1R.o MCMCmixfactanal.o MCMCmnlMH.o MCMCmnlslice.o MCMCoprobit.o MCMCordfactanal.o MCMCpanel.o MCMCpoisson.o MCMCprobit.o MCMCprobitres.o MCMCregress.o MCMCrng.o MCMCtobit.o mersenne.o optimize.o rng.o smath.o stat.o -L/usr/lib/R/lib -lR /usr/lib/gcc-lib/i486-linux/3.3.5/../../../crt1.o(.text+0x18): In function `_start': ../sysdeps/i386/elf/start.S:98: undefined reference to `main' collect2: ld returned 1 exit status make: *** [MCMCpack.so] Error 1 ERROR: compilation failed for package 'MCMCpack' I don't know why it searches a reference to 'main'... Presumably because it thinks that MCMCpack.so is supposed to be a standalone binary. (Compilers don't read filname suffixes...) There would seem to be something missing in that command line, -shared if my memory serves me. Yes, it is... Now *why* that happens is a bit hard to figure out. Your version info below is not quite sufficient; which linux distribution is it? Did you compile R itself from sources? I'm using ubuntu 5.04 (debian based), and installed precompiled binary version of R from an italian cran mirror ('woody' subdirectory). Another package with the *same* problem: bayesm. Maybe the problem is that ther's c++ code? What should I do? Antonio, Fabio Di Narzo. version _ platform i386-pc-linux-gnu arch i386 os linux-gnu system i386, linux-gnu status major2 minor1.1 year 2005 month06 day 20 language R __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Digest reading is tedious
At 11:43 01/09/05, Martin Maechler wrote: [snip section about Trevor Hastie's experience] What are other readers' experiences with mailman mailing lists in digest mode -- using MIME type delivery? I use Eudora 6.2.1.2 (which is not the very latest version) running under Windows 98 or Windows XP and the digests are fine once you have found the option 'Receive MIME digest as mailbox attachment' and turned it on. I can then see the whole set of messages, sort them by subject and reply to them individually without having to change the subject of the message. Hope that helps. Regards, Martin Michael Dewey http://www.aghmed.fsnet.co.uk __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] The Perils of PowerPoint
-Original Message- From: ... Robert Baer Sent: Friday, September 02, 2005 11:30 AM It is wrong to blame ANY tool for our own shortcomings! Surely a fortune! David L. Reiner __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] source package linking problem under linux
Antonio, Fabio Di Narzo antonio.fabio at gmail.com writes: I'm using ubuntu 5.04 (debian based), and installed precompiled binary version of R from an italian cran mirror ('woody' subdirectory). Another package with the *same* problem: bayesm. Maybe the problem is that ther's c++ code? What should I do? Install the pre-compiled MCMCpack which Debian calls r-cran-mcmcpack? Dirk __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] source package linking problem under linux
On Fri, Sep 02, 2005 at 05:33:46PM +, Dirk Eddelbuettel wrote: Antonio, Fabio Di Narzo antonio.fabio at gmail.com writes: I'm using ubuntu 5.04 (debian based), and installed precompiled binary version of R from an italian cran mirror ('woody' subdirectory). Another package with the *same* problem: bayesm. Maybe the problem is that ther's c++ code? What should I do? Install the pre-compiled MCMCpack which Debian calls r-cran-mcmcpack? Dirk knows this much better than me, but if there is a problem with the package, it might be my fault, in case you installed a backport. I just tried to build the package in the woody chroot where I built the backports: configure: WARNING: Only g++ version 3.0 or greater can be used with MCMCpack. Maybe that is the problem? In woody the gcc version is 2.95, so the precompiled binaries you are using were built with this gcc version. Ubuntu 5.04 might use a newer gcc, perhaps you can not mix and match those? If this is the case, the sarge backports might work better for you. On my sarge box install.packages(MCMCpack) works just fine when I install.packages(coda) first. I don't have an ubuntu 5.04 box around, I wonder if I could install it in a chroot as well. For you it might work if you rebuild R from source, sources for the backports should be on the cran mirror as well. Christian __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] setting par() for individual leaves/twigs/labels in plot.dendrogram
R-helpers, I seem to remember a discussion in r-help a while ago about plotting the individual leaves of a dendrogram in different colors, but I can't find the discussion in the archives or figure out how to do it. For my purposes, it doesn't really matter whether its the terminal points (leaves) or the terminal edges (twigs) or, for that matter, the labels that can be colored, but I would like to do the equivalent in plot.dendrogram of the bivariate: plot(1:10, col = c(1,1,1,1,1,2,2,2,2,3)) but with the colors applied to the leaves (or twigs or leaf labels). The edgePar, nodePar, label, and col arguments don't seem to do it. Am I missing something in the documentation, or is there a function in a package that I don't know about? Or a workaround? Or is this just not implemented? Walton Green __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] The Perils of PowerPoint
On Fri, 2 Sep 2005 12:27:45 -0500 [EMAIL PROTECTED] wrote: -Original Message- From: ... Robert Baer Sent: Friday, September 02, 2005 11:30 AM It is wrong to blame ANY tool for our own shortcomings! Surely a fortune! thx, added to the devel-version of fortunes. But allow me one remark: Although the above is certainly true, there are computational tools that help us better to realize or avoid our own shortcomings whereas others will make it harder to arrive at the right conclusions. I agree that PowerPoint cannot be blamed for the crash of the space shuttle, but I also see the point that the way presentations are generated in PowerPoint (or graphics in Excel) can easily tempt people into producing presentations/graphics that conceal what is important. This is certainly not an excuse, but I think some criticism (even if phrased a bit provocatively) should be allowed. just my EUR 0.02. Z David L. Reiner __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Superassignment (-) and indexing
In a clean environment under R-2.1.0 on Linux: x - 1:5 x[3] - 9 Error: Object x not found Isn't that odd? (Note x - 9 works just fine.) Why am I doing this? Because I'm stepping through code that normally lives inside a function, where - is appropriate. -- David Brahm ([EMAIL PROTECTED]) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] The Perils of PowerPoint
I can't lay my hands n it at the moment - its around here somewhere, but in Numerical Methods That Work by Forman Acton, the author points out that the result of computation should be insight, not numbers ps. an excellent book if you haven't seen it. https://enterprise.maa.org/ecomtpro/Timssnet/products/TNT_products.cfm cheers, Sean On 02/09/05, Achim Zeileis [EMAIL PROTECTED] wrote: On Fri, 2 Sep 2005 12:27:45 -0500 [EMAIL PROTECTED] wrote: -Original Message- From: ... Robert Baer Sent: Friday, September 02, 2005 11:30 AM It is wrong to blame ANY tool for our own shortcomings! Surely a fortune! thx, added to the devel-version of fortunes. But allow me one remark: Although the above is certainly true, there are computational tools that help us better to realize or avoid our own shortcomings whereas others will make it harder to arrive at the right conclusions. I agree that PowerPoint cannot be blamed for the crash of the space shuttle, but I also see the point that the way presentations are generated in PowerPoint (or graphics in Excel) can easily tempt people into producing presentations/graphics that conceal what is important. This is certainly not an excuse, but I think some criticism (even if phrased a bit provocatively) should be allowed. just my EUR 0.02. Z David L. Reiner __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Superassignment (-) and indexing
Permit a mild protest on the word appropriate in this context. The global assignment operator - provides, for my tastes, excessive opportunities for problems. If I define x someplace else and then call your function, it may change my x in ways that generate considerable wailing and gnashing of teeth. Unless I assign the function output to x, then the action of your function will change my x in ways I did not anticipate, possibly generating many problems for me later -- with extreme difficulties in finding the source of the problem. Moreover, if your library expects to later find in x what your function stored there, there could be other problems, because I might redefine x before you use it. The library might work fine when you use it but not for someone else -- and tracing the problem can be difficult. I understand that - may allow your function f1 to call f2 and have f2 change x in f1. However, if your f2 gets called some other way or if the name of x is misspelled or changed in either f1 or f2, we could be back to the situation I just described. spencer graves Brahm, David wrote: In a clean environment under R-2.1.0 on Linux: x - 1:5 x[3] - 9 Error: Object x not found Isn't that odd? (Note x - 9 works just fine.) Why am I doing this? Because I'm stepping through code that normally lives inside a function, where - is appropriate. -- David Brahm ([EMAIL PROTECTED]) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com http://www.pdf.com Tel: 408-938-4420 Fax: 408-280-7915 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Superassignment (-) and indexing
On Fri, 2 Sep 2005, Brahm, David wrote: In a clean environment under R-2.1.0 on Linux: x - 1:5 x[3] - 9 Error: Object x not found Isn't that odd? (Note x - 9 works just fine.) Well, yes and no. It is the result of a bug fix a version or two ago that dealt with the case where there was a local variable with the same name as a variable being modified by a complex superassignment. As the R language definition now explains x[3] - 9 is short for `*tmp*` - get(x, envir=parent.env, inherits=TRUE) `*tmp*`[3] - 9 x - `*tmp*` and so it doesn't work if x doesn't exist in the parent environment. x - 9 is ok, since it doesn't have to look up x before assigning it, but it is still a wart that x-9 creates a local variable x when executed in the global environment but not when executed anywhere else. -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Superassignment (-) and indexing
On Fri, 2 Sep 2005, Spencer Graves wrote: Permit a mild protest on the word appropriate in this context. The global assignment operator - provides, for my tastes, excessive opportunities for problems. If I define x someplace else and then call your function, it may change my x in ways that generate considerable wailing and gnashing of teeth. No, no, no. The sensible and appropriate uses of - involve modifying a variable that already exists in the lexical parent environment. In these cases it can't escape and ravage the calling environment. Certainly using - to assign to the calling environment is bogus. In addition to your complaints, it doesn't even work (except from the global environment), since - searches the lexical stack rather than the call stack. In R, - can be used safely to maintain state inside a function or shared between a set of functions (as in demo(scoping), or demo(tkdensity)). In S-PLUS it is admittedly harder to come up with good uses. -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Superassignment (-) and indexing
Wow! That's great. Thanks. spencer Thomas Lumley wrote: On Fri, 2 Sep 2005, Spencer Graves wrote: Permit a mild protest on the word appropriate in this context. The global assignment operator - provides, for my tastes, excessive opportunities for problems. If I define x someplace else and then call your function, it may change my x in ways that generate considerable wailing and gnashing of teeth. No, no, no. The sensible and appropriate uses of - involve modifying a variable that already exists in the lexical parent environment. In these cases it can't escape and ravage the calling environment. Certainly using - to assign to the calling environment is bogus. In addition to your complaints, it doesn't even work (except from the global environment), since - searches the lexical stack rather than the call stack. In R, - can be used safely to maintain state inside a function or shared between a set of functions (as in demo(scoping), or demo(tkdensity)). In S-PLUS it is admittedly harder to come up with good uses. -thomas -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com http://www.pdf.com Tel: 408-938-4420 Fax: 408-280-7915 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] tcltk - automatically moving cursor to last line of tktext box - how?
Hi; I have a program which writes lines to a tktext box (of height, say, 10) with tkinsert(txto, end, paste(so,\n)) I would like my program to be such that it automatically scrolls down through the text box when it is full so that I always see the last 10 lines written. Can anyone help on this? Best regards Søren __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk - automatically moving cursor to last line of tktext box - how?
Søren Højsgaard [EMAIL PROTECTED] writes: Hi; I have a program which writes lines to a tktext box (of height, say, 10) with tkinsert(txto, end, paste(so,\n)) I would like my program to be such that it automatically scrolls down through the text box when it is full so that I always see the last 10 lines written. Can anyone help on this? Best regards Søren How about tksee(txto, end) or maybe tkyview(txto, end - 10 lines) -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] C-index : typical values
Adaikalavan Ramasamy wrote: I am doing some coxPH model fitting and would like to have some idea about how good the fits are. Someone suggested to use Frank Harrell's C-index measure. As I understand it, a C-index 0.5 indicates a useful model. I am No, that just means predictions are better than random. probably making an error here because I am getting values less than 0.5 on real datasets. Can someone tell me where I am going wrong please ? Here is an example using the German Breast Study Group data available in the mfp package. The predictors in the model were selected by stepAIC(). library(Design); library(Hmisc); library(mfp); data(GBSG) fit - cph( Surv( rfst, cens ) ~ htreat + tumsize + tumgrad + posnodal + prm, data=GBSG, x=T, y=T ) val - validate.cph( fit, dxy=T, B=200 ) round(val, 3) index.orig training test optimism index.corrected n Dxy -0.377 -0.383 -0.370 -0.013 -0.364 200 R2 0.1400.148 0.1320.016 0.124 200 Slope 1.0001.000 0.9250.075 0.925 200 D 0.0280.030 0.0270.004 0.025 200 U -0.001 -0.001 0.002 -0.002 0.002 200 Q 0.0290.031 0.0250.006 0.023 200 1) Am I correct in assuming C-index = 0.5 * ( Dxy + 1 ) ? Yes 2) If so, I am getting 0.5*(-0.3634+1) = 0.318 for the C-index. Does this make sense ? For the Cox model, the default calculation correlates the linear predictor with survival time. A large linear predictor (large log hazard) means shorter survival time. To phrase it in the more usually way, negate Dxy before computing C. Frank 3) Should I be using some other measurement instead of C-index. Thank you very much in advance. Regards, Adai __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] The Perils of PowerPoint
On 02-Sep-05 Sean O'Riordain wrote: I can't lay my hands n it at the moment - its around here somewhere, but in Numerical Methods That Work by Forman Acton, the author points out that the result of computation should be insight, not numbers ps. an excellent book if you haven't seen it. https://enterprise.maa.org/ecomtpro/Timssnet/products/TNT_products.cfm cheers, Sean No doubt you're correct -- but I associate it with Richard Hamming (title page of Numerical Methods for Scientists and Engineers as I recall -- yes, for me too it's around here somewhere -- another really excellent book) where he words it: The purpose of computing is insight, not numbers. to which he adds: The purpose of computing numbers is not yet in sight. By the way, the Washington Post/Minneapolis Star Tribune article is somewhat reminiscent of a short (15 min) broadcast on BBC Radio 4 back on October 18 2004 15:45-16:00 called Microsoft Powerpoint and the Decline of Civilisation which explores similar themes and also frequently quotes Tufte. Unfortunately it lapsed for ever from Listen Again after the statutory week, so I can't point you to a replay. (However, I have carefully preserved the cassette recording I made). We are not, of course, going Off Topic here. If, in R, you can not indefinitely extend a tangent, then it's time to extend R. (Oh dear, I feel a fortune coming on ... ) Best wishes to all, Ted. On 02/09/05, Achim Zeileis [EMAIL PROTECTED] wrote: On Fri, 2 Sep 2005 12:27:45 -0500 [EMAIL PROTECTED] wrote: -Original Message- From: ... Robert Baer Sent: Friday, September 02, 2005 11:30 AM It is wrong to blame ANY tool for our own shortcomings! Surely a fortune! thx, added to the devel-version of fortunes. But allow me one remark: Although the above is certainly true, there are computational tools that help us better to realize or avoid our own shortcomings whereas others will make it harder to arrive at the right conclusions. I agree that PowerPoint cannot be blamed for the crash of the space shuttle, but I also see the point that the way presentations are generated in PowerPoint (or graphics in Excel) can easily tempt people into producing presentations/graphics that conceal what is important. This is certainly not an excuse, but I think some criticism (even if phrased a bit provocatively) should be allowed. just my EUR 0.02. Z David L. Reiner __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861 Date: 03-Sep-05 Time: 01:00:24 -- XFMail -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] The Perils of PowerPoint
LOL Ted! That's a great quote for fortune()! On Sat, 2005-09-03 at 01:06 +0100, Ted Harding wrote: On 02-Sep-05 Sean O'Riordain wrote: I can't lay my hands n it at the moment - its around here somewhere, but in Numerical Methods That Work by Forman Acton, the author points out that the result of computation should be insight, not numbers ps. an excellent book if you haven't seen it. https://enterprise.maa.org/ecomtpro/Timssnet/products/TNT_products.cfm cheers, Sean No doubt you're correct -- but I associate it with Richard Hamming (title page of Numerical Methods for Scientists and Engineers as I recall -- yes, for me too it's around here somewhere -- another really excellent book) where he words it: The purpose of computing is insight, not numbers. to which he adds: The purpose of computing numbers is not yet in sight. By the way, the Washington Post/Minneapolis Star Tribune article is somewhat reminiscent of a short (15 min) broadcast on BBC Radio 4 back on October 18 2004 15:45-16:00 called Microsoft Powerpoint and the Decline of Civilisation which explores similar themes and also frequently quotes Tufte. Unfortunately it lapsed for ever from Listen Again after the statutory week, so I can't point you to a replay. (However, I have carefully preserved the cassette recording I made). We are not, of course, going Off Topic here. If, in R, you can not indefinitely extend a tangent, then it's time to extend R. (Oh dear, I feel a fortune coming on ... ) Best wishes to all, Ted. On 02/09/05, Achim Zeileis [EMAIL PROTECTED] wrote: On Fri, 2 Sep 2005 12:27:45 -0500 [EMAIL PROTECTED] wrote: -Original Message- From: ... Robert Baer Sent: Friday, September 02, 2005 11:30 AM It is wrong to blame ANY tool for our own shortcomings! Surely a fortune! thx, added to the devel-version of fortunes. But allow me one remark: Although the above is certainly true, there are computational tools that help us better to realize or avoid our own shortcomings whereas others will make it harder to arrive at the right conclusions. I agree that PowerPoint cannot be blamed for the crash of the space shuttle, but I also see the point that the way presentations are generated in PowerPoint (or graphics in Excel) can easily tempt people into producing presentations/graphics that conceal what is important. This is certainly not an excuse, but I think some criticism (even if phrased a bit provocatively) should be allowed. just my EUR 0.02. Z David L. Reiner __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861 Date: 03-Sep-05 Time: 01:00:24 -- XFMail -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] The Perils of PowerPoint
(Ted Harding) wrote: By the way, the Washington Post/Minneapolis Star Tribune article is somewhat reminiscent of a short (15 min) broadcast on BBC Radio 4 back on October 18 2004 15:45-16:00 called Microsoft Powerpoint and the Decline of Civilisation which explores similar themes and also frequently quotes Tufte. Unfortunately it lapsed for ever from Listen Again after the statutory week, so I can't point you to a replay. (However, I have carefully preserved the cassette recording I made). Try http://sooper.org/misc/powerpoint.mp3 (copyright law notwithstanding...) Tim C __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Problems plotting time-series with multiple lines
Dear Sirs, I want to plot a time series with lines, one for each variable. I have a dataset with dates, and the values. How can i plot? I could plot one variable using index plot, bu i want to put the labels on X axis. But i had two problems: 1) The plot function, when i try to plot(x,y), incorectly sort the date (on X axis). My dataset has the date in string format %d/%m/%Y). If i try to converto to date using as.Date(Dataset.dates,%d/%m/%Y) it interprets the %Y incorrectly. 2) I have 187 rows. So i have to plot only some of the dates, not all. Please, help me. Thanks in advance. Best Regards, José Augusto M. de Andrade Jr. Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around darkened rooms, munching magic pills and listening to repetitive electronic music. (Kristian Wilson, Nintendo, Inc. 1989) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Problems plotting time-series with multiple lines
On 9/2/05, Jose Augusto Jr - jamaj - terra [EMAIL PROTECTED] wrote: Dear Sirs, I want to plot a time series with lines, one for each variable. I have a dataset with dates, and the values. How can i plot? I could plot one variable using index plot, bu i want to put the labels on X axis. But i had two problems: 1) The plot function, when i try to plot(x,y), incorectly sort the date (on X axis). My dataset has the date in string format %d/%m/%Y). If i try to converto to date using as.Date(Dataset.dates,%d/%m/%Y) it interprets the %Y incorrectly. Please provide a reproducible example. 2) I have 187 rows. So i have to plot only some of the dates, not all. Check out plot.Date, lines.Date and axis.Date. Also plot.zoo in the zoo package may be of use. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html