[R] bootcov and cph error

2007-02-14 Thread Williams Scott
Hi all, I am trying to get bootstrap resampled estimates of covariates in a Cox model using cph (Design library). Using the following I get the error: > ddist2.abr <- datadist(data2.abr) > options(datadist='ddist2.abr') > cph1.abr <- cph(Surv(strt3.abr,loc3.abr)~cov.a.abr+cov.b.abr, data=data2.a

Re: [R] integrate over polygon

2007-02-14 Thread ecatchpole
Haiyong, There may be better ways, but this what I'd do. (And I'm not an expert on this.) (a) surround the polygon with a rectangle, (b) define, via an indicator function, a new function that is equal to your desired function within the polygon, and zero outside it, (c) use adapt() to integr

Re: [R] How to speed up or avoid the for-loops in this example?

2007-02-14 Thread jim holtman
One concern that I have with the 'tapply' approach is that it does not create the correct results if the data it not in sorted order. See the example below: > # generate an unsorted set of data > set.seed(123) > x <- data.frame(a=sample(1:3,12,TRUE), b=sample(0:1, 12, TRUE)) > x a b 1 1 1 2

Re: [R] How to speed up or avoid the for-loops in this example?

2007-02-14 Thread Tim Churches
Marc Schwartz wrote: > OK, here is one possible solution, though perhaps with a bit more time, > there may be more optimal approaches. > > Using your example data above, but first noting that you do not want to > use: > > df <- data.frame(cbind(subject,year,event.of.interest)) > > Using cbind

Re: [R] How to speed up or avoid the for-loops in this example?

2007-02-14 Thread Tim Churches
jim holtman wrote: > On 2/14/07, Tim Churches <[EMAIL PROTECTED]> wrote: >> Any advice, tips, clues or pointers to resources on how best to speed up >> or, better still, avoid the loops in the following example code much >> appreciated. My actual dataset has several tens of thousands of rows and >>

Re: [R] How to speed up or avoid the for-loops in this example?

2007-02-14 Thread Marc Schwartz
On Thu, 2007-02-15 at 12:24 +1100, Tim Churches wrote: > Any advice, tips, clues or pointers to resources on how best to speed up > or, better still, avoid the loops in the following example code much > appreciated. My actual dataset has several tens of thousands of rows and > lots of columns, and

Re: [R] How to speed up or avoid the for-loops in this example?

2007-02-14 Thread jim holtman
On 2/14/07, Tim Churches <[EMAIL PROTECTED]> wrote: > > Any advice, tips, clues or pointers to resources on how best to speed up > or, better still, avoid the loops in the following example code much > appreciated. My actual dataset has several tens of thousands of rows and > lots of columns, and t

[R] integrate over polygon

2007-02-14 Thread Haiyong Xu
Hi there, I want to integrate a function over an irregular polygon. Is there any function which can implement this easily? Otherwise, I am thinking of divide the polygon into very small rectangles and use "adapt" to approximate it. Do you have any suggestions to get the fine division? Any

[R] How to speed up or avoid the for-loops in this example?

2007-02-14 Thread Tim Churches
Any advice, tips, clues or pointers to resources on how best to speed up or, better still, avoid the loops in the following example code much appreciated. My actual dataset has several tens of thousands of rows and lots of columns, and these loops take a rather long time to run. Everything else whi

[R] glade 3 encoding problem

2007-02-14 Thread yuri Ilioutchenko
Hello dear Developers, I have a problem in using glade with the statistical package R(through RGtk). While the dialogs in russian encoding work pretty well, the R can't read from these dialogs (getTabLabelText) in russian properly. I run WinXP. TX. _

[R] cox PH

2007-02-14 Thread carol white
Hi, after standardizing my data by dividing each covariate by its mean, the hazard ratio of variables ranges btw ~ 0.5 and 3.55. when i test the PH assumption by cox.zph, rho ranges btw -0.4235863 and 0.359827. visualizing the PH assumption by plot, the plot of scaled schoefeld residuals agai

[R] An error message...

2007-02-14 Thread Nüzhet Dalfes
Hi, When I start R on my MacBook Pro (Mac OS X 10.4.8) I get this message: 2007-02-15 00:51:16.672 R[268] *** -[NSBundle load]: Error loading code /Users/dalfes/Library/InputManagers/iPLM/iPLM.bundle/Contents/MacOS/iPLM for bundle /Users/dalfes/Library/InputManagers/iPLM/iPLM.bundle, error cod

Re: [R] rpart tree node label [Broadcast]

2007-02-14 Thread Liaw, Andy
Try the following to see: library(rpart) iris.rp(Sepal.Length ~ Species, iris) plot(iris.rp) text(iris.rp) Two possible solutions: 1. Use text(..., pretty=0). See ?text.rpart. 2. Use post(..., filename=""). Andy From: Wensui Liu > > not sure how you want to label it. > could you be more spe

Re: [R] rpart tree node label

2007-02-14 Thread Aimin Yan
> levels(training$aa_one) [1] "A" "C" "D" "E" "F" "H" "I" "K" "L" "M" "N" "P" "Q" "R" "S" "T" "V" "W" "Y" this is 19 levels of aa_one. When I see tree, in one node, it is labeled by aa_one=bcdfgknop it is obvious that it is labeled by alphabet letter ,not by levels of aa_one. I want to get

Re: [R] Putting splom in a function

2007-02-14 Thread Bert Gunter
Roberto: You need to do what ?xyplot says. as.symbol(groups) is not a variable and is certainly not subsettable. If you have a variable named "groups" in your data.frame , then ... groups = groups gives the grouping according to the levels of that variable. If you do not, then it may be picking up

Re: [R] rpart tree node label

2007-02-14 Thread Wensui Liu
not sure how you want to label it. could you be more specific? thanks. On 2/14/07, Aimin Yan <[EMAIL PROTECTED]> wrote: > I generate a tree use rpart. > In the node of tree, split is based on the some factor. > I want to label these node based on the levels of this factor. > > Does anyone know how

[R] rpart tree node label

2007-02-14 Thread Aimin Yan
I generate a tree use rpart. In the node of tree, split is based on the some factor. I want to label these node based on the levels of this factor. Does anyone know how to do this? Thanks, Aimin __ R-help@stat.math.ethz.ch mailing list https://stat.et

Re: [R] predict.lm point forecasts with factors

2007-02-14 Thread Marc Schwartz
On Wed, 2007-02-14 at 13:54 -0700, sj wrote: > hello, > > I am trying to use predict.lm to make point forecasts based on a model with > continuous and categorical independent variables > I have no problems fitting the model using lm, but when I try to use predict > to make point predictions. it re

[R] Putting splom in a function

2007-02-14 Thread Roberto Perdisci
Hello R list, I have a little problem with splom. I'd like to wrap it in a function, for example: multi.scatterplot <- function(data,groups,cols,colors) { splom(~data[,cols], groups = as.symbol(groups), data = data, panel = panel.superpose, col=colors) } and then call it like in multi.scat

Re: [R] lme4/lmer: P-Values from mcmc samples or chi2-tests?

2007-02-14 Thread Manuel Morales
On Tue, 2007-02-13 at 14:45 +0100, Christoph Scherber wrote: > Dear R users, > > I have now tried out several options of obtaining p-values for > (quasi)poisson lmer models, including Markov-chain Monte Carlo sampling > and single-term deletions with subsequent chi-square tests (although I > am

[R] predict.lm point forecasts with factors

2007-02-14 Thread sj
hello, I am trying to use predict.lm to make point forecasts based on a model with continuous and categorical independent variables I have no problems fitting the model using lm, but when I try to use predict to make point predictions. it reverts back to the original dataframe and gives me the poi

Re: [R] Questions about results from PCAproj for robust principal component analysis

2007-02-14 Thread Talbot Katz
Professor Filzmoser. Thank you so much for the detailed response. It is very helpful. -- TMK -- 212-460-5430home 917-656-5351cell >From: Peter Filzmoser <[EMAIL PROTECTED]> >To: Talbot Katz <[EMAIL PROTECTED]> >CC: r-help@stat.math.ethz.ch >Subject: Re: Questions about results from P

Re: [R] legend font

2007-02-14 Thread Duncan Murdoch
On 2/14/2007 3:12 PM, Tyler Smith wrote: > On Wed, Feb 14, 2007 at 02:40:47PM -0500, Duncan Murdoch wrote: >> On 2/14/2007 1:32 PM, Tyler Smith wrote: >> >Hi, >> > >> >I'd like to make the text in my legends italic, > > ... > >> >How can I do this? >> >> This should work: >> >> plot(1,1) >> sa

Re: [R] legend font

2007-02-14 Thread Tyler Smith
On Wed, Feb 14, 2007 at 02:40:47PM -0500, Duncan Murdoch wrote: > On 2/14/2007 1:32 PM, Tyler Smith wrote: > >Hi, > > > >I'd like to make the text in my legends italic, ... > >How can I do this? > > This should work: > > plot(1,1) > savefont <- par(font=3) > legend("topright", legend=c('Label

Re: [R] Questions about results from PCAproj for robust principal component analysis

2007-02-14 Thread Peter Filzmoser
Hi, PCAproj is mainly designed for robust PCA and not for classical PCA. Therefore, when applying classical estimators to the results of a robust PCA, like the mean to the robust PCA scores, this will usually not give zeros. The robust PCs have been centred robustly, and not classically by the mea

Re: [R] legend font

2007-02-14 Thread Duncan Murdoch
On 2/14/2007 1:32 PM, Tyler Smith wrote: > Hi, > > I'd like to make the text in my legends italic, but I can't figure out > how to do so. font=3 doesn't work. Googling brings up the possibility > of expression(italic()), which produces italics, but I can't get this > to work with my label data, wh

[R] legend font

2007-02-14 Thread Tyler Smith
Hi, I'd like to make the text in my legends italic, but I can't figure out how to do so. font=3 doesn't work. Googling brings up the possibility of expression(italic()), which produces italics, but I can't get this to work with my label data, which is a vector of strings: legend(locator(1), leg

Re: [R] legend in lattice densityplot [Broadcast]

2007-02-14 Thread Rene Braeckman
I use "key=" instead. Much more flexible. I set the parameters in "trellis.par.set" for the plot and then take these settings in "key" to get them in the legend. "space=" is part of the "key=" settings. As in this (to stick with your example): library(lattice) lg <- c("alfa","beta","gamma") a <-

[R] How to use Rpad

2007-02-14 Thread jiho.han
I am a beginner and I don't know how to use Rpad package. I installed it and opened the following example .Rpad page in Internet Explorer. When I clicked "Calculate" button, nothing seems to happen. Can anyone tell me how to use Rpad? Rpad Example Here is a basic R i

[R] help re: compiling BLACS for RscaLAPACK on OS X

2007-02-14 Thread Chris Gignoux
Hello, folks! I hope you can help a newbie out. I need to install the parallel-R functionality for a software package I am trying to download. I have been going through the steps in the install readme but I cannot find the necessary "Bmake.inc" file to allow the file to compile properly. I k

Re: [R] ran out of iteration in coxph

2007-02-14 Thread carol white
Thank you very much for your reply. How is it possibe to approximate the max number of variables that should be used considering the number of samples and censored data? Experimentally, I saw that for my specific data, I have to reduce down to 120 variables. So I wondered how it could be approx

Re: [R] isoMDS vs. other non-metric non-R routines

2007-02-14 Thread stevenmh
Hi Phil, Are you using metaMDS in the vegan package? This allows you to determine the number of random starts, and selects the best. It might help. Hank Stevens > Dear Phil, > > I don't have experiences with Minissa but I know that isoMDS is bad in > some situations. I have even seen situations wit

Re: [R] ELIF?

2007-02-14 Thread Duncan Murdoch
On 2/14/2007 11:35 AM, Johannes Graumann wrote: > Hello, > > Is there an elegant way to implement something like the elif function (e.g. > python) and prevent multiple if-else contruct concatenation when coding in > R? Why not just concatenate, using "else if"? For example, if (condition1) {

[R] sprintf error clustering with rattle

2007-02-14 Thread atoriell
Hi, I'm an italian R (and data mining) beginner. I installed R, Rattle and rggobi with no trouble. But I'm not able to do clustering (both kmean and hierarchical). When I press F5 in Rattle Cluster tab nothing happens (and no log rows in the Log Tab). On the R console I get the following error

Re: [R] font size in plots

2007-02-14 Thread M Perez
Dear Federico Check the legend function. ?legend HTH. Manuel --- Federico Abascal <[EMAIL PROTECTED]> escribió: > Dear members of the list, > > it is likely a stupid question but I cannot find the > information neither > in R manuals nor in google. > > I am generating a plot (from hclust res

[R] xts.dvs function in fCalendar

2007-02-14 Thread Leeds, Mark \(IED\)
There is a function in the fCalendar package called xts.dvs but I m unable to see the code inside the function. Is this common with functions in the fCalendar package or maybe there is something else that I have to do first or use the colon colon command in some manner I want to see the function c

Re: [R] font size in plots

2007-02-14 Thread Bert Gunter
In general, most methods for R's generic "plot" command (try: getAnywhere("plot.hclust")) in R's base graphics system accept further arguments in the (...) portion that provide these sorts of capabilities. ?par will tell you about these further graphical parameters. Bert Gunter Genentech Nonclin

[R] Be at metropolis

2007-02-14 Thread Mollie Campbell
HOT ALERT! Campaign for: UTEVPrice: $0.016 Market: hellish!! 500% profit guaranted, it's progressive energy company. Information: The nature of UTEV's main business is to commercialize environmentally-friendly technologies.UTEV's activities are oriented towards sustainable development

[R] ELIF?

2007-02-14 Thread Johannes Graumann
Hello, Is there an elegant way to implement something like the elif function (e.g. python) and prevent multiple if-else contruct concatenation when coding in R? Sorry for my newbieishness, Joh __ R-help@stat.math.ethz.ch mailing list https://stat.ethz

Re: [R] simple question on intervals

2007-02-14 Thread Ido M. Tamir
>I have a number (correlation coefficient) "x" in [-1,1], and a color >palette col<-grey(1:N/N) for a given N. I want to assign a color from "col" >to "x" which corresponds to "x" in levels of cut(-1:1,N). > >So for N<-4 and x<-0.3, the color should be col[3]. For N<-4 and x<--0.8, >the color shoul

[R] font size in plots

2007-02-14 Thread Federico Abascal
Dear members of the list, it is likely a stupid question but I cannot find the information neither in R manuals nor in google. I am generating a plot (from hclust results) but I cannot see properly the labels because the default font size is too large. How can I change it? Thanks! Federico

[R] symbols hidden in polar.plot

2007-02-14 Thread Sumitrajit Dhar
Hi Folks, Here is my attempt at a simple polar plot. > pos <- seq(0,360,by=5) > tspk <- rep(c(1,0,1),c(13,47,13)) > require(plotrix) > polar.plot(tspk,pos,rp.type="s",point.symbols=17,point.col="green4") I only see half the symbols, the other half of each symbol is hidden under the circu

[R] Snow vs Rmpi

2007-02-14 Thread Vadim Ogranovich
Hi, I have few high-level questions about the Snow and Rmpi packages . I understand that Snow uses Rmpi as one of possible transport layers, yet my questions about user experience, not technical details: 1. Does Snow install and work well in Windows? 2. Interruptibility. I understand that cu

[R] How to generate observed/predicted value tables from logistic analysis

2007-02-14 Thread Fabio Sanchez
I have been using Hapassoc a R module for analyzing haplotypes in genetics. It uses a GLM approach. One of the things it does is to infer haplotypes in people with uncertain genotype phases, the estimation of ORs is based on this inferred haplotype frequencies. I want to report the number of obs

[R] simple question on intervals

2007-02-14 Thread Serguei Kaniovski
Hi, I have a number (correlation coefficient) "x" in [-1,1], and a color palette col<-grey(1:N/N) for a given N. I want to assign a color from "col" to "x" which corresponds to "x" in levels of cut(-1:1,N). So for N<-4 and x<-0.3, the color should be col[3]. For N<-4 and x<--0.8, the color shou

Re: [R] legend in lattice densityplot [Broadcast]

2007-02-14 Thread Albert Vilella
I am defining the legend using trellis.par.set (not sure if correctly), and space does not seem to do the trick. auto-key (here commented) places it to the top... a = rep(c("alfa","beta","gamma","alfa","beta","gamma"),100) b = rnorm(600) input=data.frame(a,b) densityplot(~(input$b), groups=input

Re: [R] how to report logistic regression results

2007-02-14 Thread Frank E Harrell Jr
Edwin Commandeur wrote: > Dear all, > > I am comparing logistic regression models to evaluate if one predictor > explains additional variance that is not yet explained by another predictor. > As far as I understand Baron and Li describe how to do this, but my question > is now: how do I report thi

Re: [R] nested model: lme, aov and LSMeans

2007-02-14 Thread Douglas Bates
On 2/13/07, shirley zhang <[EMAIL PROTECTED]> wrote: > I'm working with a nested model (mixed). > > I have four factors: Patients, Tissue, sex, and tissue_stage. > > Totally I have 10 patients, for each patient, there are 2 tissues > (Cancer vs. Normal). > > I think Tissue and sex are fixed. Patien

Re: [R] legend in lattice densityplot [Broadcast]

2007-02-14 Thread Wiener, Matthew
>From the documentation for xyplot (referred to from densityplot): The position of the key can be controlled in either of two possible ways. If a component called space is present, the key is positioned outside the plot region, in one of the four sides, determined by the value of space, which can

Re: [R] Boxplot: quartiles/outliers

2007-02-14 Thread Richard M. Heiberger
Please see Michael Frigge and David C. Hoaglin and Boris Iglewicz. "Some Implementations of the Boxplot". The American Statistician. Vol. 43 (1), February 1989. 50–54. They investigate and compared several alternate definitions of the hinges (quartiles) and conclude that Tukey's definition is

Re: [R] legend in lattice densityplot

2007-02-14 Thread Albert Vilella
How can I place the legend to the left or right of the densityplot? By default, it goes at the top, and as it is a rather long list, the density plot only uses half the space of the whole graphic... On 11/30/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Me too on Windows XP. > > Its probably

[R] [R-pkgs] New version of rattle released

2007-02-14 Thread Graham Williams
A new version of Rattle (2.1.123), a Gnome-base GUI for data mining, written completely in R, and available on GNU/Linux, Unix, Mac OSX, and MS/Windows, has been released to CRAN. There has been quite a lot of activity since the last update, including: Transform: Now include basic imputat

[R] [R-pkgs] New PMML package

2007-02-14 Thread Graham Williams
A new package is now available on CRAN - pmml. PMML is the Predictive Modelling Markup Language, and is accepted by a number of large database and data warehouse systems (IBM DB2 and NCR Teradata) for deployment of models as SQL. The current package is an "early release" in that it is very basic

Re: [R] linear coefficient combination stderr?

2007-02-14 Thread Gabor Grothendieck
vcov can simplify it slightly: se <- sqrt( t(a) %*% vcov(m) %*% a ) ( a %*% beta ) / se On 2/14/07, Abhijit Dasgupta <[EMAIL PROTECTED]> wrote: > look at the function "estimable" in the package gmodels. This does the > t.stat that you mention below. > > Otherwise, if you wanted to do this by han

Re: [R] Boxplot: quartiles/outliers

2007-02-14 Thread Petr Pikal
Hi Google "boxplot" see Wikipedia The boxplot was invented in 1977 by American statistician John Tukey. John W. Tukey. "Exploratory Data Analysis". Addison-Wesley, Reading, MA. 1977 So you shall probably look there. HTH Petr On 14 Feb 2007 at 16:35, Vikas Rawal wrote: Date sent:

Re: [R] Boxplot: quartiles/outliers

2007-02-14 Thread Vikas Rawal
> > > I am not sure why you would want to do this, and a 'box and whiskers plot' > > was pretty closely defined by the original authors so R does not allow > > options for forms they did not consider. > > I was wondering who the original authors were? Would be interested in > looking up thei

Re: [R] Boxplot: quartiles/outliers

2007-02-14 Thread Vikas Rawal
> I am not sure why you would want to do this, and a 'box and whiskers plot' > was pretty closely defined by the original authors so R does not allow > options for forms they did not consider. I was wondering who the original authors were? Would be interested in looking up their description.

Re: [R] Is this a correct forum to discuss basic R problem?

2007-02-14 Thread ONKELINX, Thierry
?aggregate ?by ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assuranc

Re: [R] Is this a correct forum to discuss basic R problem?

2007-02-14 Thread Henrique Dallazuanna
Yes, df is your data.frame. tapply(df$y, df$x, sum) On 14/02/07, d. sarthi maheshwari <[EMAIL PROTECTED]> wrote: > > Hi > > Sorry if this is a wrong post in the forum. Please suggest if this is a > correct forum to discuss R related basic problem. > > I wanted to perform the following task by u

[R] Is this a correct forum to discuss basic R problem?

2007-02-14 Thread d. sarthi maheshwari
Hi Sorry if this is a wrong post in the forum. Please suggest if this is a correct forum to discuss R related basic problem. I wanted to perform the following task by using R: e.g. input data.frame x y a10 b20 a10 a

[R] RE3: Suddenly "Subscript out of bounds"

2007-02-14 Thread roderick . castillo
Hello Thierry Sorry for my assumption about automatically updating R itself. Your question is a reasonable one. I have to update the modules regularly because the users urge me to do so. Updating R itself means more work, specially if you have to recompile all modules! Of course you can just mo

[R] Are there any packages or methods for running data from AHP(Analytic Hierarchy Process) survey?

2007-02-14 Thread Kum-Hoe Hwang
Hi, R Lovers! I have some survey data. I'd like to run R or R packages for processing data inputted from AHP(Analytic Hierarchy Process) survey. Are there any R packages or subsititues for running data from AHP survey. Thanks in advance, -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516Email : [EM

Re: [R] Computing stats on common parts of multiple dataframes

2007-02-14 Thread Murali Menon
Hi Gabor, Eric, Your suggestions are certainly more elegant (and involve less typing) than my for-loop. Thanks! Patrick, I see what you mean regarding dates. The problem is that I'm doing all sorts of manipulations on the original data, which work best on numeric matrices, and the dates just

Re: [R] se.contrast confusion

2007-02-14 Thread Adam D. I. Kramer
On Wed, 14 Feb 2007, Prof Brian Ripley wrote: >> I've got what I'd expect to be a pretty simple issue: I fit an aov object >> using multiple error strata, and would like some significance tests for the >> contrasts I specified. > > It _is_ covered on the relevant help page. See the 'split' argum

[R] how to report logistic regression results

2007-02-14 Thread Edwin Commandeur
Dear all, I am comparing logistic regression models to evaluate if one predictor explains additional variance that is not yet explained by another predictor. As far as I understand Baron and Li describe how to do this, but my question is now: how do I report this in an article? Can anyone recommen