Re: [R] Grouping stripchart markers

2009-02-14 Thread Dimitris Rizopoulos
well, for a simple stripchart (i.e., default method) you can use something like the following: x <- rnorm(9) cl <- c(1,1,1,2,2,2,3,3,3) plot(range(x), c(0, 1), type = "n", yaxt = "n", ann = FALSE) points(x, rep(0.5, length(x)), pch = cl) I hope it helps. Best, Dimitris Sam Player wrote: If

[R] Grouping stripchart markers

2009-02-14 Thread Sam Player
If I have a dataset grouped into 3 classes, how can I construct a stripchart where the markers are different for each class, e.g. a cross for 1, square for 2 and circle for 3. In the example below I try to define the marker type by the class but this only changes all the markers from the defaul

Re: [R] Issue with step(): Fails to look for object$model

2009-02-14 Thread Adam D. I. Kramer
A fine answer, and indeed I am aware of the option to leave the model empty. I like the option of consistently not being protected from myself. That said, some other R functions (predict comes to mind) use $model if it exists (which it usually does, though needn't) but allow new (or "other") data

Re: [R] Delete row if first letter of row name is

2009-02-14 Thread Daniel Moreira
Try: mydata[substr(rownames(mydata),1,1)!="U",] where mydata is a matrix or data.frame. Daniel Moreira, MD "Sally" Sent by: r-help-boun...@r-project.org 02/14/2009 11:48 PM Please respond to Sally To cc Sally Subject [R] Delete row if first let

[R] Delete row if first letter of row name is

2009-02-14 Thread Sally
Hello! I am still a beginner. Can you tell me how to delete a row (from a matrix or data.frame) if the row name starts with U? See example below: U179971039 0.0586630.087575 empty1 -0.1296 -0.09105 empty2 0.136259 0.398073 empty3 0.446041 -0.33997 Sally

[R] Overloading in R

2009-02-14 Thread SHRIKANTH SHANKAR
I have been trying to write a new class that reimplements the vector class. As a test of my overloading I decided to try and and call t.test on two vectors which were objects of my class rather than the default class. The overloaded length I wrote seems to work correctly. I used setMethod("length

Re: [R] Issue with step(): Fails to look for object$model

2009-02-14 Thread Bill.Venables
It's pretty simple. In R, objects are stored im memory. If the objects are big, they take up a lot of memory. If your data frame is big, the objects are big too. The problem really only arises commonly if you are fitting many models simultaneously and holding them all in memory at once, but

Re: [R] Issue with step(): Fails to look for object$model

2009-02-14 Thread Juliet Hannah
Could you explain how memory problems may arise? I understand that by using model=FALSE, we can reduce the memory required. But if we did not, what kinds of problems may arise. I have run into a possible memory leak that I have not been able to work around (using yags, not lm). I am trying to gain

Re: [R] Issue with step(): Fails to look for object$model

2009-02-14 Thread Bill.Venables
Without arguing you case I would point out that the data need not be there in l$model: > l <- lm(y ~ x, data=ex, model = FALSE) > l Call: lm(formula = y ~ x, data = ex, model = FALSE) Coefficients: (Intercept)x 0.1310 -0.1736 > l$model NULL Model objects are often hu

[R] Issue with step(): Fails to look for object$model

2009-02-14 Thread Adam D. I. Kramer
Hi, I'm playing around with stepwise regression, using the step function, and believe I have found a bug (or at least, a strong case for improvement): ex <- data.frame(y=rnorm(100),x=rnorm(100)) l <- lm(y ~ x, data=ex) step(l) [output is correct] rm(ex) step(l) Start: AIC=11.79 y ~

Re: [R] Website, book, paper, etc. that shows example plots of distributions?

2009-02-14 Thread Gabor Grothendieck
The regression book by John Fox: http://socserv.mcmaster.ca/jfox/Books/Companion/index.html has a section on regression diagnostics and everything is done in R which might make it particularly suitable. On Sat, Feb 14, 2009 at 6:48 PM, Jason Rupert wrote: > Many thanks to Greg L. Snow and David W

Re: [R] implementing Grubbs outlier test on a large dataframe

2009-02-14 Thread Frank E Harrell Jr
John Malone wrote: Hi! I'm trying to implement an outlier test once/row in a large dataframe. Ideally, I'd do this then add the Pvalue results and the number flagged as an outlier as two new separate columns to the dataframe. Grubbs outlier test requires a vector and I'm confused how to make ea

Re: [R] Website, book, paper, etc. that shows example plots of distributions?

2009-02-14 Thread Jason Rupert
Many thanks to Greg L. Snow and David Winsemius for their responses.  First off I can safely say I don't know enough statistics to be dangerous, but hopefully I will get to that point:) Regarding the goal - ultimately I would like to use linear regression (constrained for using linear regress

Re: [R] implementing Grubbs outlier test on a large dataframe

2009-02-14 Thread David Winsemius
Sending each row of a datatframe, dfm, as a vector to a function, fcn, is as simple as; apply(dfm, 1, fcn) e.g.: > dfm <- data.frame(x=rnorm(10), y=rnorm(10), z=rnorm(10)) > > apply(dfm, 1, sum) [1] 0.7385838 -3.1819193 0.3415670 -0.6552601 -1.3470174 -0.6446259 -0.6544967 [8] 0.1778

[R] implementing Grubbs outlier test on a large dataframe

2009-02-14 Thread John Malone
Hi! I'm trying to implement an outlier test once/row in a large dataframe. Ideally, I'd do this then add the Pvalue results and the number flagged as an outlier as two new separate columns to the dataframe. Grubbs outlier test requires a vector and I'm confused how to make each row of my datafram

Re: [R] Outlier Detection for timeseries

2009-02-14 Thread Pele
Hi Hans - I tried your suggestion and it worked out well... Many thanks!! Also, thank to everyone else for their suggestions. Hans W. Borchers-4 wrote: > > Pele yahoo.com> writes: > >> >> >> Hello R users, >> >> Can someone tell if there is a package in R that can do outlier detection >>

[R] Getting current location from Grid

2009-02-14 Thread jtbates
The help file for grid.line.to says that Grid has the notion of a current location. Is there a way to get that current location? I looked for a function that returns this but I didn't find anything. Basically, I'm looking to do something like turtle graphics and I need to write a function like g

Re: [R] need help with errors in betareg analysis

2009-02-14 Thread Ben Bolker
knussear wrote: > > Yes, fair enough. I wasn't sure it was fitting the mode at all, but here > is an example of what I see > >> model <- betareg(ACT ~ ST+DOY, data = actDL_F) > Warning messages: > 1: In sqrt(diag(fisherinv)) : NaNs produced > 2: In sqrt(diag(fisherinv)) : NaNs produced > 3: In

Re: [R] need help with errors in betareg analysis

2009-02-14 Thread knussear
Yes, fair enough. I wasn't sure it was fitting the mode at all, but here is an example of what I see > model <- betareg(ACT ~ ST+DOY, data = actDL_F) Warning messages: 1: In sqrt(diag(fisherinv)) : NaNs produced 2: In sqrt(diag(fisherinv)) : NaNs produced 3: In sqrt(W) : NaNs produced 4: In sqrt(

Re: [R] need help with errors in betareg analysis

2009-02-14 Thread Ben Bolker
knussear mac.com> writes: > > > Hi > > I'm trying to fit a model in betareg and I'm getting errors, but have no > idea what they mean or how to solve them. Does anyone have experience with > this? > > > model <- betareg(ACT ~ ST*SoilT, data = actDL_F) > Warning messages: > 1: In sqrt(W) : NaN

[R] Houston area R meetup

2009-02-14 Thread hadley wickham
Hi all, Could you please email me off-list if you'd be interested (and able) in attending a regular R meetup in Houston. Very tentatively it would be held the last Monday or Wednesday of the month, 5-6:30pm at Rice University. It could be as formal as informal as you like, but I'm imagining a so

Re: [R] Bootstrap or Wilcoxons' test?

2009-02-14 Thread David Winsemius
On Feb 14, 2009, at 3:23 AM, Thomas Lumley wrote: On Fri, 13 Feb 2009, David Winsemius wrote: I must disagree with both this general characterization of the Wilcoxon test and with the specific example offered. First, we ought to spell the author's correctly and then clarify that it is th

[R] San Francisco use R! Group - Reminder & Call for Presenters

2009-02-14 Thread Jim Porzak
All Bay Area useR's, Quick reminder that our use R! Group 2009 kick off meeting is next Wednesday evening: http://www.meetup.com/R-Users/calendar/9573566/ at Predictive Analytics World. Panel Discussion - The R and Science of Predictive Analytics: Four Case Studies in R * Bo Cowgill, Google

Re: [R] Anova and unbalanced designs

2009-02-14 Thread John Fox
Dear Tal, > -Original Message- > From: Tal Galili [mailto:tal.gal...@gmail.com] > Sent: February-14-09 10:23 AM > To: John Fox > Cc: Peter Dalgaard; Nils Skotara; r-help@r-project.org; Michael Friendly > Subject: Re: [R] Anova and unbalanced designs > > Hello John and other R mailing list

Re: [R] Outlier Detection for timeseries

2009-02-14 Thread markleeds
Doug Martin et al ( he may not be the first author ) has a book called Robust Regression and I vaguely recall seeing a chapter in there related to outlier detection. in time series. Given that there's an S+ package associated with the book, maybe that package has been or can be translated to

Re: [R] Outlier Detection for timeseries

2009-02-14 Thread Gabor Grothendieck
Check out the Tramo Seats and Gretl packages. These are not R packages but are free. The first one has outlier detection and the second has interfaces to both Tramo Seats and R which may or may not allow you to access Tramo Seats indirectly from R. On Sat, Feb 14, 2009 at 8:15 AM, Pele wrote: >

Re: [R] Anova and unbalanced designs

2009-02-14 Thread Tal Galili
Hello John and other R mailing list members. I've been following your discussions regarding the Anova command for the SS type 2/3 repeated measures Anova, and I have a question: I found that when I go from using type II to using type III, the summary model is suddenly added with an "intercept" te

Re: [R] Mann Whitney test

2009-02-14 Thread Frank E Harrell Jr
Daniel Moreira wrote: Rodrigo, Wilcoxon?Mann?Whitney allows arbitrary sample sizes. It is an extension of the original Wilcoxon test which only handles equal sample sizes. Daniel Moreira, MD I believe you'll find that the Wilcoxon 2-sample test alway

Re: [R] Mann Whitney test

2009-02-14 Thread Daniel Moreira
Rodrigo, Wilcoxon?Mann?Whitney allows arbitrary sample sizes. It is an extension of the original Wilcoxon test which only handles equal sample sizes. Daniel Moreira, MD Research Associate Duke University Medical Center DUMC 2626, MSRB-I Room 455 571 Rese

[R] Mann Whitney test

2009-02-14 Thread Rodrigo Fernandes Ramalho
Hi, I have a statistical question. To apply the Mann Whitney test to compare a pair of vectors, they must to have the same length ? Thanks, Rodrigo [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] Outlier Detection for timeseries

2009-02-14 Thread Hans W. Borchers
Pele yahoo.com> writes: > > > Hello R users, > > Can someone tell if there is a package in R that can do outlier detection > that give outputs simiilar to what I got from SAS below. > > Many thanks in advance for any help! I guess you are talking about the OUTLIER procedure in SAS that att

Re: [R] Outlier Detection for timeseries

2009-02-14 Thread Pele
Hi Stephen, I am doing cross correlation analysis and I am trying to find a outlier detection function in R that can detect changes in the level of the response series that are not accounted for by the estimated model. Something that tells whether the changes are considered Additive Outliers, Lev

Re: [R] glm problem

2009-02-14 Thread Duncan Murdoch
On 13/02/2009 11:59 PM, Roger wrote: Hello, I have a weird problem here. What I want to do is that I need to draw 1000 samples from a matrix, and use glm on them. when I used this command, it runs without the problem qdata.glm = glm(X258 ~ ., family = binomial, data = q2data[sample(dim(q2dat

[R] glm problem

2009-02-14 Thread Roger
Hello, I have a weird problem here. What I want to do is that I need to draw 1000 samples from a matrix, and use glm on them. when I used this command, it runs without the problem > qdata.glm = glm(X258 ~ ., family = binomial, data = q2data[sample(dim(q2data)[1], 1000), ]) but if I drew the sa

Re: [R] Dynamic Panel Analysis in R

2009-02-14 Thread Johannes Habel
Hi Tanveer, the PLM package includes the possibility to estimate instrumental variable models. It also includes a function PGMM to estimate GMM models. Try ?pgmm... By the way, if you manage to make this function work, I'd be glad for a quick note. I've been ecountering massive problems with this

[R] Dynamic Panel Analysis in R

2009-02-14 Thread C.T.Shehzad
Hi! I am quite a new user of R. I wanted to ask if there was some package for dynamic panel analysis (with Arneallo-Bond Method) like stata. PLM is for panel analysis but not for dynamic. Best regards, Tanveer __ R-help@r-project.org mailing list

[R] Latent Class Analysis Prediction

2009-02-14 Thread John Sparks
Hi Everybody, If I build a latent class model using lca or flexmix, how can I use the result to score another set of data and get predictions for class membership for that other set of data? I don't see a predict. function for lca or flexmix. Help would be much appreciated. --John Sparks

Re: [R] Bootstrap or Wilcoxons' test?

2009-02-14 Thread Thomas Lumley
On Fri, 13 Feb 2009, David Winsemius wrote: I must disagree with both this general characterization of the Wilcoxon test and with the specific example offered. First, we ought to spell the author's correctly and then clarify that it is the Wilcoxon rank-sum test that is being considered. Next,