Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Michael Bedward
All values in a matrix are the same type, so if you've set up a matrix with a character column then your numeric values will also be stored as character. That would explain why they are being converted to factors. It would also explain why your query isn't working. Michael On 11 November 2010

Re: [R] prcomp function

2010-11-11 Thread kicker
Dear Claudia, you are right. Thank you very much for your explanations. So in the non-centered case SDEV does not contain the square roots of the eigenvalues of the covariance/correlation matrix. In in the centered case it holds A´A=(n-1)*cov(A) (not n+1). Have a nice day. -- View this

[R] predict.coxph and predict.survreg

2010-11-11 Thread Michael Haenlein
Dear all, I'm struggling with predicting expected time until death for a coxph and survreg model. I have two datasets. Dataset 1 includes a certain number of people for which I know a vector of covariates (age, gender, etc.) and their event times (i.e., I know whether they have died and when if

Re: [R] Kolmogorov Smirnov Test

2010-11-11 Thread Kerry
Thanks for the feedback. My goal is to run a simple test to show that the data cannot be rejected as either normally or uniformally distributed (depening on the variable), which is what a previous K-S test run using SPSS had shown. The actual distribution I compare to my sample only matters that

[R] How to get a specific named element in a nested list

2010-11-11 Thread Friedericksen Hope
Hello, I have a nested named list structure, like the following: x - list( list( list(df1,df2) list(df3, list(df4,df5)) list(df6,df7))) with df1...d7 as data frames. Every data frame is named. Is there a way to get a specific named element

[R] Number above the bar?

2010-11-11 Thread Joel
Hi I got an barplot, and I would like to have the exact number of the bars just above the bars anyone know how to do this? Sorry for bad English, and I do hope that you understand what im after. //Joel -- View this message in context:

[R] Help with slope comparisons

2010-11-11 Thread Ravi Kulkarni
Hello Forum, I have data for two groups of subjects for a ratio variable (cortisol level) assessed three times during the day (at 0600, 0900 and 2100 hours). So I have three means for each group. I have been asked to do a slope analysis to compare the two groups. According to my

Re: [R] How to get a specific named element in a nested list

2010-11-11 Thread Ivan Calandra
Hi, A reproducible example would have been nice, but a correct code even more (you forgot some commas)! So if you meant this: x - list( list( list(df1,df2), list(df3, list(df4,df5)), list(df6,df7))) check str(x): (I removes the details of each df) List of 1 $ :List of 3

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Noah Silverman
That makes perfect sense. Since I need to build up the results table sequentially as I iterate through the data, how would you recommend it?? Thanks, -N On 11/11/10 12:03 AM, Michael Bedward wrote: All values in a matrix are the same type, so if you've set up a matrix with a character

[R] Adding meta-data when creating objects. e.g: changing - so to (for example) add creation time - how-to and pros/cons?

2010-11-11 Thread Tal Galili
My objective is to start having meta-data on objects that I create. For example, consider the following function: assign2 - function(x, ...) { assign(x, ...) attr(x, creation time) - Sys.time() x - x } assign2(x, 1:4) assign2 assigns to x the vector 1:4, and it then also adds the creation

Re: [R] Plot Axes

2010-11-11 Thread dpender
Thanks Jim, The next issue is how i get the RP lines to cut the axes. The lines either cut the x axis at D=35 or the y axis at H=4.5. How do I set the axes so that the lines start and end on the axes? http://r.789695.n4.nabble.com/file/n3037496/plot.jpeg -- View this message in context:

Re: [R] create a pairwise coocurrence matrix

2010-11-11 Thread Stefan Evert
If I understood you correctly, you have this matrix of indicator variables for occurrences of terms in documents: A - matrix(c(1,1,0,0,1,1,1,0,1,1,1,0,0,0,1), nrow=3, byrow=TRUE, dimnames=list(paste(doc,1:3), paste(term,1:5))) A and want to determine co-occurrence counts for pairs of

Re: [R] Kolmogorov Smirnov Test

2010-11-11 Thread Ted Harding
On 11-Nov-10 04:22:55, Kerry wrote: I'm using ks.test (mydata, dnorm) on my data. I think your problem may lie here! If you look at the documentation for ks.test, available with the command: help(ks.test) or simply: ?ks.test you will read the following near the beginning: Usage: ks.test(x,

Re: [R] help cannot put multiple chart Stacked Bar (from PerformanceAnalysis library) in a single plot

2010-11-11 Thread Patrick Nguyen
Thx for the details Josh! You're right - I meant performance analytics. I'm about 4 weeks into R now so I'm a bit of a noob. I've downloaded the source to see what you're talking about. I'll play around with it. The data is pretty straight forward and has something like this:

Re: [R] How to get a specific named element in a nested list

2010-11-11 Thread Michael Bedward
Hi Friedericksen, This function will do it. No doubt there are more elegant ways :) rmatch - function(x, name) { pos - match(name, names(x)) if (!is.na(pos)) return(x[[pos]]) for (el in x) { if (class(el) == list) { out - getEl(el, name) if (!is.null(out)) return(out)

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Michael Bedward
You can use rbind as in your original post, but if you've got a mix of character and numeric data start with a data.frame rather than a matrix. Michael On 11 November 2010 20:30, Noah Silverman n...@smartmediacorp.com wrote: That makes perfect sense. Since I need to build up the results table

[R] logging interim results using foreach/doMC

2010-11-11 Thread Martin Tomko
Dear all, I am converting a large process to a parallel backhend using doMC and foreach. Basically, I havea long list of input graph files and each of them calls soem basic igraph package functions. I am parallelizing the run, in order to save time. All works fine, and each %dopar% call ends

Re: [R] How to get a specific named element in a nested list

2010-11-11 Thread Janko Thyson
What you want is some sort of indexing nested lists based on names (as we are used to for vectors, for example). As Ivan pointed out, I don't think there's an out-of-the-box function in R that supports such indexing as it requires some sort of mapping of the nested list's hierarchical structure.

Re: [R] Adding meta-data when creating objects. e.g: changing - so to (for example) add creation time - how-to and pros/cons?

2010-11-11 Thread Michael Bedward
Hi Tal, Here's a way of doing the first bit... assign2 - function(x, ...) { xname - deparse(substitute(x)) assign(xname, ...) x - get(xname) attr(x, creation.time) - Sys.time() assign(xname, x, pos=.GlobalEnv) } Michael On 11 November 2010 20:37, Tal Galili tal.gal...@gmail.com

Re: [R] How to get a specific named element in a nested list

2010-11-11 Thread Friedericksen Hope
Hi Ivan, thank you very much for your detailed explanations and response! Please excuse, that I did not include a reproducible example. Yes, what I am looking for is such a function - but I suspect, that it does not exist already, so I have to write it on my own. Best, Friedericksen On

Re: [R] Adding meta-data when creating objects. e.g: changing - so to (for example) add creation time - how-to and pros/cons?

2010-11-11 Thread Barry Rowlingson
On Thu, Nov 11, 2010 at 9:37 AM, Tal Galili tal.gal...@gmail.com wrote: 4) My real intention is to somehow change the - operator (not simply the assign).  I am unsure as to how to do that. 5) Are there any major pros/cons to the adding of such meta-data to objects? (for example, excessive

Re: [R] Adding meta-data when creating objects. e.g: changing - so to (for example) add creation time - how-to and pros/cons?

2010-11-11 Thread Michael Bedward
As a hack you could do this... assign(=, assign2) Michael On 11 November 2010 21:30, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Thu, Nov 11, 2010 at 9:37 AM, Tal Galili tal.gal...@gmail.com wrote: 4) My real intention is to somehow change the - operator (not simply the

Re: [R] How to get a specific named element in a nested list

2010-11-11 Thread Michael Bedward
On 11 November 2010 21:08, Janko Thyson janko.thy...@ku-eichstaett.de wrote: Could it be that you forgot to supply 'getEL()'? Or do I have to use some package to make it available? Oops - no. The problem was me stupidly renaming the function without modifying the code. Try this instead...

Re: [R] maptools package

2010-11-11 Thread Jon Olav Skoien
On 11/10/2010 11:27 PM, Aleksandr Andreev wrote: OK, that loads the shape file. But now when I do: submap- subset(spb, as.character(spb$Name) == 'Vasilevsky Island') the submap still has the whole city, not just the subset. Is there now a different way of extracting a subset from a map? I

[R] Export lmList

2010-11-11 Thread Rosario Garcia Gil
Hello I am trying to export and lmList by write.table(x, x.csv) and it complains. I have tried to convert the lmList into data.frame but also complains. Any suggestion? Thanks Rosario __ R-help@r-project.org mailing list

[R] Tinn-R_2.3.6.0

2010-11-11 Thread Hannu Kahra
Hi, I just found out that Tinn-R_2.3.6.0 is now available on http://sourceforge.net/projects/tinn-r/. When configuring Tinn-R: R Configure Permanent (Rprofile.site) I get error C:\Program Files\R\R-2.12.0\bin\etc\RProfile.site The above file was not found. Please try to repeat the procedure!

Re: [R] How to get a specific named element in a nested list

2010-11-11 Thread Keith Jewell
Neat! I think replacing out - rmatch(el, name) with out - Recall(el, name) will avoid the dependence of the code on the function name Keith J Michael Bedward michael.bedw...@gmail.com wrote in message news:aanlktikv9zepxipbp7ftr8vmpgsjaptjyj_dudy-m...@mail.gmail.com... On 11 November

Re: [R] Adding meta-data when creating objects. e.g: changing - so to (for example) add creation time - how-to and pros/cons?

2010-11-11 Thread Ivan Calandra
Hi, I have tried this (just to practice): assign2 - function(x, ...){ assign(x, ..., envir=.GlobalEnv) attr(get(x, envir=.GlobalEnv), creation.time) - Sys.time() } assign2(y, 1:4) Error in attr(get(x), creation.time) - Sys.time() : could not find function get- Why doesn't it work? If I

Re: [R] can't get/find or install R.dll?

2010-11-11 Thread Duncan Murdoch
On 10/11/2010 10:53 PM, dartdog wrote: Ok the DLL is in the C:\Program Files\R\R-2.12.0\bin\i386 directory but as the error shows it seems that rpy2 is looking in R.dll within C:\PROGRA~1\R\R-212~1.0 So I'm a bit lost here... What's unclear? The version you're working with hasn't been

Re: [R] Tinn-R_2.3.6.0

2010-11-11 Thread Uwe Ligges
Please tell the authors of Tinn-R. Uwe Ligges On 11.11.2010 12:12, Hannu Kahra wrote: Hi, I just found out that Tinn-R_2.3.6.0 is now available on http://sourceforge.net/projects/tinn-r/. When configuring Tinn-R: R Configure Permanent (Rprofile.site) I get error C:\Program

Re: [R] randomForest parameters for image classification

2010-11-11 Thread Liaw, Andy
Please show us the code you used to run randomForest, the output, as well as what you get with other algorithms (on the same random subset for comparison). I have yet to see a dataset where randomForest does _far_ worse than other methods. Andy -Original Message- From:

Re: [R] Number above the bar?

2010-11-11 Thread Marianne Promberger
Hi Joel, I got an barplot, and I would like to have the exact number of the bars just above the bars anyone know how to do this? Google r number above bars barplot for threads on this list how to do it and why you might not want to. ?text Marianne -- Marianne Promberger PhD, King's College

[R] Survey on Statistical Computing Email Lists

2010-11-11 Thread ohri2007
If you have trouble viewing or submitting this form, you can fill it out online: https://spreadsheets.google.com/viewform?formkey=dGczV2J4ai03NXhqZVZKZHR4YWFZSWc6MQ Survey on Statistical Computing Email Lists This is a survey for research purposes. All results would be aggregated and

Re: [R] Plot Axes

2010-11-11 Thread Gavin Simpson
On Thu, 2010-11-11 at 01:41 -0800, dpender wrote: Thanks Jim, The next issue is how i get the RP lines to cut the axes. The lines either cut the x axis at D=35 or the y axis at H=4.5. How do I set the axes so that the lines start and end on the axes?

[R] metafor: including phylogenetic non-independence among species?

2010-11-11 Thread Scott Chamberlain
Hello, Is it possible to include information about phylogenetic relatedness among species (when species are replicates for each study within a meta-analysis) in a meta-anlaysis in the metafor package? Alternatively, I wonder if the method f Lajeunesse 2009 American Naturalist has been adopted in

Re: [R] log-transformed linear regression

2010-11-11 Thread Mike Marchywka
Date: Wed, 10 Nov 2010 19:27:20 -0500 From: sa.cizm...@usherbrooke.ca To: r-help@r-project.org Subject: Re: [R] log-transformed linear regression Dear List, I would like to take another chance and see if there if someone has anything to say to

[R] Nuisance parameters for Geyer Saturation process.

2010-11-11 Thread Neba Funwi-Gabga
Hello group, Can someone please put me through how to estimate the nuisance parameters (Saturation parameter and radius) for the Geyer saturation process? It seems quite confusing to me how these parameters are achieved, but they are very important in determining the interaction between points in

[R] Area-Interaction Process

2010-11-11 Thread Neba Funwi-Gabga
Hello, Does the area-interaction process built in Spatstat actually work for data in a polygonal windows? I try to run it but I get the error message that W must be a rectangular object, but my window is a polygon of my study area. Please any help? neba [[alternative HTML version

Re: [R] plot options including formatting axes

2010-11-11 Thread Jannis
Hi Sachin, please read the posting guide and include a reproducible example of what you want to do. For your first question you should have a look at ?axis. Supplying the 'at' argument with the positions of the desired marks and the 'labels' with text strings like '10.000$' should do what

Re: [R] standardized/studentized residuals with loess

2010-11-11 Thread Oliver Frings
Hi Josh, many thank's for your reply. I tried to read up on this more and to be frank I got a bit confused about the exact definition of residual standardization. It occurs to me that different people have different definitions and that it can be done with and without the leverage of each point.

Re: [R] Format table help

2010-11-11 Thread cameron
Phil you're right Mthticker is not a table. Mthticker is a list. I am trying to reformat all elements in the list. or i can reformat one element and do a loop around it. Thanks Cameron Mthticker str List of 5 $ :'zoo' series from 01/02/04 to 11/01/10 Data: chr [1:83] LHG04LHJ04

[R] r-2.12.0 - Hmisc

2010-11-11 Thread R Heberto Ghezzo, Dr
Hello, I am working on a HP Laptop with R 2.12 just installed, I tried: R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-pc-mingw32/i386 (32-bit) ... library(Hmisc) Loading required package: survival Loading required

Re: [R] r-2.12.0 - Hmisc

2010-11-11 Thread Duncan Murdoch
On 11/11/2010 8:57 AM, R Heberto Ghezzo, Dr wrote: Hello, I am working on a HP Laptop with R 2.12 just installed, I tried: R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-pc-mingw32/i386 (32-bit) ... library(Hmisc)

Re: [R] r-2.12.0 - Hmisc

2010-11-11 Thread Uwe Ligges
On 11.11.2010 14:57, R Heberto Ghezzo, Dr wrote: Hello, I am working on a HP Laptop with R 2.12 just installed, I tried: R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-pc-mingw32/i386 (32-bit) ... library(Hmisc)

Re: [R] Export lmList

2010-11-11 Thread David Winsemius
On Nov 11, 2010, at 6:04 AM, Rosario Garcia Gil wrote: Hello I am trying to export and lmList by write.table(x, x.csv) and it complains. I have tried to convert the lmList into data.frame but also complains. Any suggestion? The most important suggestion would to provide context. Why are

[R] plotrix: reverse length scale

2010-11-11 Thread Pep Serra
Hi! I wanted to know if there could be a way to reverse lengths in polar.plot or radial.plot. As far as I am concerned, larger lengths imply lines or points further from the center of the circle and I want it the other way around: so if my length limits are from 0 to 2000 I want points with

Re: [R] create a pairwise coocurrence matrix

2010-11-11 Thread David Winsemius
On Nov 11, 2010, at 4:44 AM, Stefan Evert wrote: Pasted and realigned from original posting: term1 term2 term3 term4 term5 term1 0 2 0 1 3 term2 2 0 0 1 2 term3 0 0 0 0 0 term4 1 1 0 0 1 term5 3 2 0 1 1 Any ideas on how to do that? If I understood you correctly, you have this matrix of

[R] problem with uroot package: ADF.test

2010-11-11 Thread Inger
Hi all, I have a problem while working with the uroot package, more specifically with the ADF.test. The smallest p-value it prints is 0.0100 but I want to know the exact p-value. R does warn you about the problem by saying the following: In interpolpval(code = code, stat = adfreg[, 3], N =

Re: [R] clustering association rules

2010-11-11 Thread Michael Hahsler
Jüri, How did you create the output? An example to cluster transactions with arules can be found in: Michael Hahsler and Kurt Hornik. Building on the arules infrastructure for analyzing transaction data with R. In R. Decker and H.-J. Lenz, editors, /Advances in Data Analysis, Proceedings of

[R] Rserve Installing error on AIX5.3..

2010-11-11 Thread nabsan_jp
Hello all! I am nabsan. I've got error below when I try to install the Rserve0.6.3 on AIX5.3. also I tried several version of Rserve 0.4.3 to 0.6.3.. but there were same error message.. [ld: 0711-317 ERROR: Undefined symbol: .main] any help please. -- OS:AIX5.3

Re: [R] Simple Function

2010-11-11 Thread rnick
Thanks! It worked fine. -- View this message in context: http://r.789695.n4.nabble.com/Simple-Function-tp3035585p3038017.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] bootstrap/boot unknown distribution

2010-11-11 Thread francogrex
Hi, this is a question about bootstrapping, it relates more to the concept than to the R package boot. But I wonder below if boot can help me. I have the below to calculate a certain point estimate: estimate= (0.9 * 0.03 * 70 * (((77 * (76 / 76.0)) / 83107) - ((174 * (154 / 154.0)) /

Re: [R] predict.coxph and predict.survreg

2010-11-11 Thread David Winsemius
On Nov 11, 2010, at 3:44 AM, Michael Haenlein wrote: Dear all, I'm struggling with predicting expected time until death for a coxph and survreg model. I have two datasets. Dataset 1 includes a certain number of people for which I know a vector of covariates (age, gender, etc.) and their

Re: [R] Help with slope comparisons

2010-11-11 Thread David Winsemius
On Nov 11, 2010, at 4:16 AM, Ravi Kulkarni wrote: Hello Forum, I have data for two groups of subjects for a ratio variable (cortisol level) assessed three times during the day (at 0600, 0900 and 2100 hours). So I have three means for each group. I have been asked to do a slope analysis to

Re: [R] NA handling problem in capscale (vegan)

2010-11-11 Thread Gavin Simpson
On Thu, 2010-11-11 at 18:14 +1100, Nevil Amos wrote: I am having a problem with NA handling in capscale function. as I understand it from the help capscale should permit NA values when na.action=na.mit or na.exclude, however I am getting the error Error in X[nas, , drop = FALSE] :

Re: [R] log-transformed linear regression

2010-11-11 Thread Mike Marchywka
I had a few more thoughts but briefly it almost looks like exp at low X and lin at higher X may be something to test. Anyway, I'd be hard pressed to see how a linear fit, that you are happy to turn to log-log fit, could give you a number of any relevance except maybe over a few limited

Re: [R] predict.coxph and predict.survreg

2010-11-11 Thread Mattia Prosperi
Indeed, from the predict() function of the coxph you cannot get directly time predictions, but only linear and exponential risk scores. This is because, in order to get the time, a baseline hazard has to be computed and it is not straightforward since it is implicit in the Cox model. 2010/11/11

Re: [R] log-transformed linear regression

2010-11-11 Thread Matt Shotwell
Servet, These data do look linear in log space. Fortunately, the model log(y) = a + b * log(x) does have intercept zero in linear space. To see this, consider log(y) = a + b * log(x) y = 10^(a + b * log(x)) y = 10^a * 10^(b * log(x)) y = 10^a * 10^(log(x^b)) y = 10^a * x^b

Re: [R] Rdindex truncating titles?

2010-11-11 Thread Duncan Murdoch
On 07/11/2010 9:17 PM, Rolf Turner wrote: On 8/11/2010, at 1:24 PM, Duncan Murdoch wrote: SNIP ... The docs do say to limit the length of titles to 65 characters if possible; this is one place where it matters. SNIP The 65 character limit had not previously impinged

Re: [R] predict.coxph and predict.survreg

2010-11-11 Thread Michael Haenlein
Thanks very much for your answers, David and Mattia. I understand that the baseline hazard in a Cox model is unknown and that this makes the calculation of expected survival difficult. Does this change when I move to a survreg model instead? I think I'm OK with estimating a Cox model (or a

Re: [R] predict.coxph and predict.survreg

2010-11-11 Thread James C. Whanger
Michael, You are looking to compute an estimated time to death -- rather than the odds of death conditional upon time. Thus, you will want to use time to death as your dependent variable rather than a dichotomous outcome ( 0=alive, 1=death). You can accomplish this with a straight forward

Re: [R] [lattice] densityplot label the peak.

2010-11-11 Thread Joon Yeong Kim
I tried using panel function but wasn't sure how to get the y value for the peak of the densityplot. I'm thinking there should be a way to retrieve the densityplot object so that I can get the (x,y) values of the curve directly from the object. Anyone know how to do this? Thank you. Joon On

[R] R2WinBUGS: Error in bugs(program=openbugs) but not openbugs()

2010-11-11 Thread Yuelin Li
I get an error when I call bugs(..., program=OpenBUGS, bugs.directory=c:/Program Files/OpenBUGS/OpenBUGS312), expecting, as suggested in help(bugs), that it would fit the model with openbugs() via BRugs. help(bugs) ... either winbugs/WinBUGS or openbugs/OpenBUGS, the latter makes use of

Re: [R] Kolmogorov Smirnov Test

2010-11-11 Thread Greg Snow
Consider the following simulations (also fixing the pnorm instead of dnorm that Ted pointed out and I missed): out1 - replicate(1, { x - rnorm(1000, 100, 3); ks.test( x, pnorm, mean=100, sd=3 )$p.value } ) out2 - replicate(1, { x - rnorm(1000, 100, 3);

Re: [R] predict.coxph and predict.survreg

2010-11-11 Thread Michael Haenlein
Thanks for the comment, James! The problem is that my initial sample (Dataset 1) is truncated. That means I only observe time to death for those individuals who actually died before end of my observation period. It is my understanding that this type of truncation creates a bias when I use a

Re: [R] standardized/studentized residuals with loess

2010-11-11 Thread Bert Gunter
This is a simple and sensible question that does not have a simple answer. It's a research issue, and you should go to the literature to see what approaches seem appropriate. HOWEVER, one simple descriptive approach -- which, however, may have important statistical flaws -- is to run loess on the

Re: [R] predict.coxph and predict.survreg

2010-11-11 Thread David Winsemius
On Nov 11, 2010, at 12:14 PM, Michael Haenlein wrote: Thanks for the comment, James! The problem is that my initial sample (Dataset 1) is truncated. That means I only observe time to death for those individuals who actually died before end of my observation period. It is my understanding

[R] Consistency of Logistic Regression

2010-11-11 Thread Benjamin Godlove
Dear R developers, I have noticed a discrepancy between the coefficients returned by R's glm() for logistic regression and SAS's PROC LOGISTIC. I am using dist = binomial and link = logit for both R and SAS. I believe R uses IRLS whereas SAS uses Fisher's scoring, but the difference is

[R] User input after opening graphing device

2010-11-11 Thread jeitel
If I run the following: windows() bringToTop(-1) interactive() [1] TRUE run - readline(prompt = Continue (Yes = 1, No = 2):) Continue (Yes = 1, No = 2): dummy - 1 run [1] it does not allow user input though the session is interactive (it jumps right over the

[R] overlap histogram and density

2010-11-11 Thread Roslina Zakaria
Hi, Does anybody encounter the same problem when we overlap histogram and density     that the density line seem to shift to the right a little bit?           If you do have the same problem, what should we do to correct that?           Thank you.           par(mar=c(4,4,2,1.2),oma=c(0,0,0,0))  

Re: [R] Consistency of Logistic Regression

2010-11-11 Thread Erik Iverson
Is the algorithm converging? Is there separation (i.e., perfect predictor) in the model? Are you getting a warning about fitted probabilities of 0 or 1?, etc. We would need much more information (preferably a reproducible example) before we can help. Benjamin Godlove wrote: Dear R developers,

Re: [R] User input after opening graphing device

2010-11-11 Thread Bert Gunter
PLEASE follow the posting guide and give us the output of sessionInfo(). I was unable to duplicate your problem -- it worked fine for me. sessionInfo() R version 2.12.0 (2010-10-15) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 [2]

Re: [R] Consistency of Logistic Regression

2010-11-11 Thread Albyn Jones
do you have factors (categorical variables) in the model? it could be just a parameterization difference. albyn On Thu, Nov 11, 2010 at 12:41:03PM -0500, Benjamin Godlove wrote: Dear R developers, I have noticed a discrepancy between the coefficients returned by R's glm() for logistic

Re: [R] R error using Survr function with gcmrec

2010-11-11 Thread Emily
I'm having the same problem and was wondering whether you ever found a solution? It gives me the error Error in Survr(id, time, event) : Data doesn't match. Every subject must have a censored time even though all my subjects are right-censored, and to be sure, I've even used the addCenTime

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Noah Silverman
Still doesn't work. When using rbind to build the data.frame, it get a structure mostly full of NA. The data is correct, so something about pushing into the data.frame is breaking. Example code: results - data.frame() for(i in 1:n){ #do all the work #a is a test label. b,c,d are

Re: [R] R error using Survr function with gcmrec

2010-11-11 Thread David Winsemius
On Nov 11, 2010, at 2:09 PM, Emily wrote: I'm having the same problem (???: from a three year-old posting for which you didn't copy any context.) and was wondering whether you ever found a solution? It gives me the error Error in Survr(id, time, event) : Data doesn't match. Every

Re: [R] Consistency of Logistic Regression

2010-11-11 Thread Ben Bolker
Albyn Jones jones at reed.edu writes: do you have factors (categorical variables) in the model? it could be just a parameterization difference. albyn On Thu, Nov 11, 2010 at 12:41:03PM -0500, Benjamin Godlove wrote: Dear R developers, I have noticed a discrepancy between the

Re: [R] predict.coxph and predict.survreg

2010-11-11 Thread Michael Haenlein
David, Mattia, James -- thanks so much for all your helpful comments! I now have a much better understanding of how to calculate what I'm interested in ... and what the risks are of doing so. Thanks and all the best, Michael On Thu, Nov 11, 2010 at 7:33 PM, David Winsemius

Re: [R] overlap histogram and density

2010-11-11 Thread Ben Bolker
Roslina Zakaria zroslina at yahoo.com writes: Hi, Does anybody encounter the same problem when we overlap histogram and density     that the density line seem to shift to the right a little bit?           par(mar=c(4,4,2,1.2),oma=c(0,0,0,0))     hist(datobs,prob=TRUE, main =Volume of

Re: [R] R error using Survr function with gcmrec

2010-11-11 Thread David Winsemius
On Nov 11, 2010, at 2:50 PM, David Winsemius wrote: On Nov 11, 2010, at 2:09 PM, Emily wrote: I'm having the same problem (???: from a three year-old posting for which you didn't copy any context.) and was wondering whether you ever found a solution? It gives me the error Error in

Re: [R] overlap histogram and density

2010-11-11 Thread Ted Harding
On 11-Nov-10 18:39:34, Roslina Zakaria wrote: Hi, Does anybody encounter the same problem when we overlap histogram and density that the density line seem to shift to the right a little bit? If you do have the same problem, what should we do to correct that? Thank you.

Re: [R] overlap histogram and density

2010-11-11 Thread Ted Harding
[OOPS!!I accidentally reproduced my second example below as my third example. Now corrected. See below.] On 11-Nov-10 20:02:29, Ted Harding wrote: On 11-Nov-10 18:39:34, Roslina Zakaria wrote: Hi, Does anybody encounter the same problem when we overlap histogram and density that the

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Peter Langfelder
On Thu, Nov 11, 2010 at 11:33 AM, Noah Silverman n...@smartmediacorp.com wrote: Still doesn't work. When using rbind to build the data.frame, it get a structure mostly full of NA. The data is correct, so something about pushing into the data.frame is breaking. Example code: results -

Re: [R] randomForest can not handle categorical predictors with more than 32 categories

2010-11-11 Thread Sven Garbade
You can try ctree in package party, but anyway: what is the deeper sense in a binary split for a variable with more than 32 levels? Regards, Sven 2010/11/10 Erik Iverson er...@ccbr.umn.edu: Well, the error message seems relatively straightforward. When you run str(x) (you did not provide the

Re: [R] R error using Survr function with gcmrec

2010-11-11 Thread Emily C
Sorry for the lack of context - I found a forum ( http://r.789695.n4.nabble.com/R-help-f789696.html) that I thought was easier to navigate and was using it for the first time. Hit the reply button, but forgot that the mailing list recipients would not see previous message in the thread. I've

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread William Dunlap
Peter, Your example doesn't work for me unless I set options(stringsAsFactors=TRUE) first. (If I do set that, then all columns of 'results' have class character, which I doubt the user wants.) results - data.frame() n = 10 for(i in 1:n){ +a = LETTERS[i]; +b = i; +c = 3*i + 2 +

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread John Kane
--- On Thu, 11/11/10, William Dunlap wdun...@tibco.com wrote: From: William Dunlap wdun...@tibco.com Subject: Re: [R] Populating then sorting a matrix and/or data.frame To: Peter Langfelder peter.langfel...@gmail.com, r-help@r-project.org Received: Thursday, November 11, 2010, 4:19 PM

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Peter Langfelder
On Thu, Nov 11, 2010 at 1:19 PM, William Dunlap wdun...@tibco.com wrote: Peter, Your example doesn't work for me unless I set options(stringsAsFactors=TRUE) first. (If I do set that, then all columns of 'results' have class character, which I doubt the user wants.) You probably mean

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread William Dunlap
You are right, I mistyped it. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: John Kane [mailto:jrkrid...@yahoo.ca] Sent: Thursday, November 11, 2010 1:58 PM To: Peter Langfelder; r-help@r-project.org; William Dunlap Subject: Re: [R] Populating

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Peter Langfelder
On Thu, Nov 11, 2010 at 1:19 PM, William Dunlap wdun...@tibco.com wrote: Peter, Your example doesn't work for me unless I set options(stringsAsFactors=TRUE) first. Yes, you need to set options(stringsAsFactors=FALSE) (note the FALSE). I do it always so I forgot about that, sorry.

[R] exploratory analysis of large categorical datasets

2010-11-11 Thread Lara Poplarski
Dear List, I am looking to perform exploratory analyses of two (relatively) large datasets of categorical data. The first one is a binary 80x100 matrix, in the form: matrix(sample(c(0,1),25,replace=TRUE), nrow = 5, ncol=5, dimnames = list(c( group1, group2,group3, group4,group5), c(V.1, V.2,

[R] Develop, Scale and Deploy your analyses more easily with Spotfire S+ 8.2

2010-11-11 Thread Louis Bajuk-Yorgan
Continuing our focus on providing the best commercial platform for creating and sharing statistical analyses, TIBCO is proud to announce the general availability of Spotfire S+ 8.2. This release focuses on helping our customers scale their analyses to solve larger analytic problems and to share

[R] comma separated format

2010-11-11 Thread sachinthaka . abeywardana
Hi All, I'm trying to create labels to plot such that it doesn't show up as scientific notation. So for example how do I get R to show 1e06 as $1,000,000. I was wondering if there was a single function which allows you to do that, the same way that as.Date() allows you to show in date format on

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Noah Silverman
Your errors look exactly like mine. Changing the option flag does allow me to create the data.frame without any errors. A quick look confirms that all the values are there and correct. However, R has coerced all of my numeric values to strings. Using your sample code also turns all the

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Noah Silverman
That makes perfect sense. All of my numbers are being coerced into strings by the c() function. Subsequently, my data.frame contains all strings. I can't know the length of the data.frame ahead of time, so can't predefine it like your example. One thought would be to make it arbitrarily long

Re: [R] comma separated format

2010-11-11 Thread jim holtman
Is this what you want: paste($, format(1e6, big.mark = ',', format = 'f'), sep='') [1] $1,000,000 On Thu, Nov 11, 2010 at 5:51 PM, sachinthaka.abeyward...@allianz.com.au wrote: Hi All, I'm trying to create labels to plot such that it doesn't show up as scientific notation. So for example

[R] Troubleshooting sweave

2010-11-11 Thread sachinthaka . abeywardana
Hi All, I've reproduced the example from Prof. Friedrich Leisch's webpage. When I write sweave(Example-1.Snw) OR sweave(Example-1.Rnw), (yes, I renamed them). I get the following error: Writing to file example-1.tex Processing code chunks ... 1 : echo term verbatim Error: chunk 1 Error in

Re: [R] comma separated format

2010-11-11 Thread David Winsemius
On Nov 11, 2010, at 5:51 PM, sachinthaka.abeyward...@allianz.com.au wrote: Hi All, I'm trying to create labels to plot such that it doesn't show up as scientific notation. So for example how do I get R to show 1e06 as $1,000,000. Knowing how these things usually have even more compact

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Peter Langfelder
I see 4 ways to write the code: 1. make the frame very long at the start and use my code - this is practical if you know that your data frame will not be longer than a certain number of rows, be it a million; 2a. use something like result1 = data.frame(a=a, b=b, c=c, d=d) within the loop to

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread David Winsemius
On Nov 11, 2010, at 6:38 PM, Noah Silverman wrote: That makes perfect sense. All of my numbers are being coerced into strings by the c() function. Subsequently, my data.frame contains all strings. I can't know the length of the data.frame ahead of time, so can't predefine it like your

  1   2   >