Re: [R] if ... problem with compound instructions

2006-12-31 Thread Bill.Venables
Step 1: quadrant <- 1 + (X[, 1] < 0) + 2*(X[, 2] > 0) This is not the usual labelling of the quadrants as '3' and '4' are interchanged. If you want to be picky about it quadrant <- ifelse(quadrant > 2, 7 - quadrant, quadrant) Step 2: angle <- atan2(X[,2], X[,1]) %% (2*pi) # I think this is w

Re: [R] Does SQL group by have a heavy duty equivalent in R

2006-12-31 Thread Charles C. Berry
On Sun, 31 Dec 2006, Charles C. Berry wrote: > On Sun, 31 Dec 2006, Farrel Buchinsky wrote: > >> I have hundreds of humans who have undergone SNP genotyping at hundreds of >> loci. Some have even undergone the procedure twice or thrice (kind of an >> internal control). >> >> So obviously I nee

Re: [R] New to R

2006-12-31 Thread Wensui Liu
what is the format of your data files, txt/csv/mdb/xls? the syntax is very different. could you please give more info? thanks. On 12/31/06, Obinna Duru <[EMAIL PROTECTED]> wrote: > Hey, I am very new to R and I need to use it (and the ACEPACK > package) to do some statistical analysis. > > I hav

[R] New to R

2006-12-31 Thread Obinna Duru
Hey, I am very new to R and I need to use it (and the ACEPACK package) to do some statistical analysis. I have installed acepack but efforts to get started has been unsuccessful. I can't seem to be able to load my data files because I am yet to figure the syntax to use. Is there a work director

Re: [R] if ... problem with compound instructions

2006-12-31 Thread Duncan Murdoch
On 12/31/2006 9:35 PM, Richard Rowe wrote: > I am having problems with the 'if' syntax. > > I have an n x 4 matrix, X say. The first two columns hold x, y values and > I am attempting to fill the second two columns with the quadrant in which > the datapoint (x, y) is and with the heading angle.

[R] if ... problem with compound instructions

2006-12-31 Thread Richard Rowe
I am having problems with the 'if' syntax. I have an n x 4 matrix, X say. The first two columns hold x, y values and I am attempting to fill the second two columns with the quadrant in which the datapoint (x, y) is and with the heading angle. So I have two problems 1) how to do this elegantly

Re: [R] Does SQL group by have a heavy duty equivalent in R

2006-12-31 Thread Charles C. Berry
On Sun, 31 Dec 2006, Farrel Buchinsky wrote: > I have hundreds of humans who have undergone SNP genotyping at hundreds of > loci. Some have even undergone the procedure twice or thrice (kind of an > internal control). > > So obviously I need to find those replications, and confirm that the results

Re: [R] Subset by using multiple values

2006-12-31 Thread Farrel Buchinsky
I found a solution to my problem. I thought I would post it here. That will help me in 3 months when I have forgotten it or some other poor soul who stumbles across the same problem. RawSeqBig<-RawSeqBig[RawSeqBig$ASSAY_ID %in% rejectrs$rs==FALSE,] "Farrel Buchinsky" <[EMAIL PROTECTED]> wrote i

[R] Subset by using multiple values

2006-12-31 Thread Farrel Buchinsky
I have a vector containg about 20 unique values. It is called rejectrs$rs. It is a factor I have a data frame with about 10 rows. I want to exclude all rows where in variable rs the value is one of the 20 on the exclude list. I thought this would work but none did. RawSeqBig<-subset(RawSeqBig,

Re: [R] Does SQL group by have a heavy duty equivalent in R

2006-12-31 Thread Farrel Buchinsky
The reason that I used the as.matrix is because I understood that everything in the data.frame had to be either numeric or character. Most of mine were factors. Thank you so much for finding my elusive spelling mistake. I removed the offending "d" from "measured" and now it works. However, I have

Re: [R] Does SQL group by have a heavy duty equivalent in R

2006-12-31 Thread hadley wickham
> I converted the whole data frame to character by using > as.matrix You shouldn't need to do that. > And then using a posting that explained how to get the naming conventions > back (which had been lost when converting to matrix) > > Anything that I did not list with the id's it insisted in incl

Re: [R] zero random effect sizes with binomial lmer

2006-12-31 Thread Daniel Ezra Johnson
Gregor, Thanks for your replies. 1) Yes, I have tweaked the data to show as clearly as I can that this is a bug, that a tiny change in initial conditions causes the collapse of a reasonable 'parameter' estimate. 2) mcmcsamp() does not work (currently) for binomial fitted models. 3) This is an

Re: [R] zero random effect sizes with binomial lmer

2006-12-31 Thread Gregor Gorjanc
Daniel Ezra Johnson babel.ling.upenn.edu> writes: > > > If one compares the random effect estimates, in fact, one sees that > > > they are in the correct proportion, with the expected signs. They are > > > just approximately eight orders of magnitude too small. Is this a bug? > > > > BLUPs are es

Re: [R] zero random effect sizes with binomial lmer

2006-12-31 Thread Gregor Gorjanc
Daniel Ezra Johnson babel.ling.upenn.edu> writes: ... > More broadly, is it hopeless to analyze this data in this manner, or > else, what should I try doing differently? It would be very useful to > be able to have reliable estimates of random effect sizes, even when > they are rather small.

Re: [R] Does SQL group by have a heavy duty equivalent in R

2006-12-31 Thread Farrel Buchinsky
I converted the whole data frame to character by using as.matrix And then using a posting that explained how to get the naming conventions back (which had been lost when converting to matrix) Anything that I did not list with the id's it insisted in including them with the measured variables. I

Re: [R] zero random effect sizes with binomial lmer

2006-12-31 Thread Andrew Robinson
I'm not sure that shrinkage is the answer, in this case. I observed a similar problem with the gamma distribution, which I mentioned here: http://tolstoy.newcastle.edu.au/R/e2/help/06/12/6903.html Since there hasn't been any discussion, I'm starting to think that it is a bug. Andrew On Sun, De

Re: [R] tabulate: switching columns and rows

2006-12-31 Thread hadley wickham
> Thanks, Hadley, > > My fault: I've not provided the line concerning replicate variable. It is > included in ?xtabs: > > warpbreaks$replicate <- rep(1:9, len = 54) > > It will be great to have an example with these given data. Anyway, I will > have a look to reshape at the given site. Thanks a l

Re: [R] tabulate: switching columns and rows

2006-12-31 Thread Gabor Grothendieck
Add the argument col.vars = 2:3 to your ftable call. See ?ftable On 12/31/06, Ricardo Rodríguez <[EMAIL PROTECTED]> wrote: > Hi all, > > Please, is there any way of controlling factors in row/columns when using > ftable/xtabs? As far as I can see, the last cross-clasifing variable in the > form

[R] zero random effect sizes with binomial lmer

2006-12-31 Thread Daniel Ezra Johnson
I've found a way to make this problem, if it's not a bug, more clear. I've taken my original data set A and simply doubled it with AA<-rbind(A,A). Doing so, instead of this: Random effects: # A Groups NameVariance Std.Dev. Subject (Intercept) 1.63e+00 1.28e+00 Item(Intercept)

Re: [R] tabulate: switching columns and rows

2006-12-31 Thread Ricardo Rodríguez - Your XEN ICT Team
>>> hadley wickham<[EMAIL PROTECTED]> 31/12/2006 19:33 >>> >Hi Ricardo, >You might want to have a look at the reshape package, >http://had.co.nz/reshape, which provides a more general and flexible >framework for reshaping data in R. > >The version of warpbreaks I have doesn't have the replicate v

Re: [R] tabulate: switching columns and rows

2006-12-31 Thread hadley wickham
Hi Ricardo, > Please, is there any way of controlling factors in row/columns when using > ftable/xtabs? As far as I can see, the last cross-clasifing variable in the > formula will appear in columns. The previous ones, in rows. For instance, is > it possible to make tension and replicate appea

[R] tabulate: switching columns and rows

2006-12-31 Thread Ricardo Rodríguez
Hi all, Please, is there any way of controlling factors in row/columns when using ftable/xtabs? As far as I can see, the last cross-clasifing variable in the formula will appear in columns. The previous ones, in rows. For instance, is it possible to make tension and replicate appear in columns

Re: [R] zero random effect sizes with binomial lmer

2006-12-31 Thread Daniel Ezra Johnson
> > If one compares the random effect estimates, in fact, one sees that > > they are in the correct proportion, with the expected signs. They are > > just approximately eight orders of magnitude too small. Is this a bug? > > BLUPs are essentially shrinkage estimates, where shrinkage is > determine

[R] (no subject)

2006-12-31 Thread Daniel Ezra Johnson
> > If one compares the random effect estimates, in fact, one sees that > > they are in the correct proportion, with the expected signs. They are > > just approximately eight orders of magnitude too small. Is this a bug? > > BLUPs are essentially shrinkage estimates, where shrinkage is > determined

Re: [R] Which programming paradigm does R

2006-12-31 Thread Gabor Grothendieck
Its object oriented inspired by the Dylan language and Scheme. Some additional information is available in this thread: https://stat.ethz.ch/pipermail/r-help/2003-July/036437.html There are also a number of packages which layer other programming language models on top of R: - R.oo provides for

[R] Which programming paradigm does R

2006-12-31 Thread Ricardo Rios
Hi wizards, I have a question. Which programming paradigm does R handle? . Iam looking for this information but I didn't found nothing. Thanks in advance. personal web site: http://www.geocities.com/ricardo_rios_sv/index.html -- personal web site: http://www.geocities.com/ricardo_rios_sv/

Re: [R] OT: any recommendation for scripting language

2006-12-31 Thread Doran, Harold
I'm a bit new with python, but have found it extremely easy to learn and use. I have been using it to pre-process some text files that we often deal with and need to be formatted in a certain way before they can be used for statistical analysis in another software program. I suppose there is one t

Re: [R] Does SQL group by have a heavy duty equivalent in R

2006-12-31 Thread hadley wickham
> nr.attempts > <-aggregate(RawSeq$GENOTYPE_ID,list(sample=RawSeq$SAMPLE_ID,assay=RawSeq$ASSAY_ID),length) > This was simply to figure out how many times the same piece of information > had been obtained. I ran out of patience. It took beyond forever and tapply > did not perform much better. The re

Re: [R] rimage package broken with fedora upgrade

2006-12-31 Thread Jonathan Baron
Responding to the original post, which I did not save. > On 31/12/06, John Kornak <[EMAIL PROTECTED]> wrote: > > > > > > Dear R list members > > > > I would be grateful if anyone could guide me to a solution for fixing my > > rimage package problem described below. > > > > I recently upgraded my m

Re: [R] zero random effect sizes with binomial lmer

2006-12-31 Thread Gregor Gorjanc
Daniel Ezra Johnson babel.ling.upenn.edu> writes: ... > If one compares the random effect estimates, in fact, one sees that > they are in the correct proportion, with the expected signs. They are > just approximately eight orders of magnitude too small. Is this a bug? ... BLUPs are essentiall

[R] zero random effect sizes with binomial lmer

2006-12-31 Thread Daniel Ezra Johnson
I am fitting models to the responses to a questionnaire that has seven yes/no questions (Item). For each combination of Subject and Item, the variable Response is coded as 0 or 1. I want to include random effects for both Subject and Item. While I understand that the datasets are fairly smal