[R] fitting mixed models to censored data?

2007-04-23 Thread Douglas Grove
Hi, I'm trying to figure out if there are any packages allowing one to fit mixed models (or non-linear mixed models) to data that includes censoring. I've done some searching already on CRAN and through the mailing list archives, but haven't discovered anything. Since I may well have done a

Re: [R] fitting mixed models to censored data?

2007-04-23 Thread Douglas Grove
Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Grove Sent: Monday, April 23, 2007 10:58 AM To: r-help@stat.math.ethz.ch Subject: [R] fitting mixed models to censored data? Hi, I'm trying to figure

Re: [R] fitting mixed models to censored data?

2007-04-23 Thread Douglas Grove
() or coxph() --- is another alternative to explore, I believe. Hope that helps, Bill Nonclinical Statistics, Centocor R D -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Douglas Grove Sent: Monday, April 23, 2007 2:29 PM To: Bert Gunter Cc: r-help

Re: [R] cannot turn some columns in a data frame into factors

2006-05-11 Thread Douglas Grove
You need to create a new object and assign it to 'df' so you'd do something like this: df - sapply(factors, function (name) { pos - match(name,df.names) factor(df[[pos]]) }) Doug On Thu, 11 May 2006, Sam Steingold wrote: * jim

Re: [R] is there a formatted output in R?

2006-03-10 Thread Douglas Grove
You really need to learn how to do some searching, as you seem to be constantly asking questions you can answer yourself help.search(sprintf) On Fri, 10 Mar 2006, Michael wrote: something like sprintf in C? so I can do: print(sprintf(the correct result is %3.4f\n, myresult)); ---

[R] can I do this with read.table??

2006-01-26 Thread Douglas Grove
Hi, I'm trying to figure out if there's an automated way to get read.table to read in my data and *not* convert the character columns into anything, just leave them alone. What I'm referring to as 'character columns' are columns in the data that are quoted. For columns of alphabetic strings

Re: [R] can I do this with read.table??

2006-01-26 Thread Douglas Grove
reads carefully, as.is protects a character vector from converstion to a *factor*, but not from conversion to numeric/logical. Doug On Sun, 26 Feb 2006, Kjetil Brinchmann Halvorsen wrote: Douglas Grove wrote: Hi, I'm trying to figure out if there's an automated way to get read.table

Re: [R] Selecting data frame components by name - do you know a shorter way?

2006-01-20 Thread Douglas Grove
So you want to create a subset of a data frame? with components name1 name2 name3 ... dframe[, c(name1,name2,name3,...)] will do that Doug On Fri, 20 Jan 2006, Michael Reinecke wrote: Hi! I suspect there must be an easy way to access components of a data frame by name, i.e. the input

Re: [R] 'x' must be numeric

2006-01-20 Thread Douglas Grove
It's much more helpful if you show the actual command you used. Presumably you have a data frame 'd' and you've done hist(d), and 'hist' has complained because d is not numeric, d is a data frame that *contains* a numeric vector. You need to give hist() that numeric vector, which you can do in

Re: [R] discovery (was: data.frame to character)w

2005-06-10 Thread Douglas Grove
Help pages are useful, you should try them e.g. ?pi or ?LETTERS How can one discover or list all available built-in objects? On Jun 10, 2005, at 7:23 AM, Muhammad Subianto wrote: L3 - LETTERS[1:3] L10 - LETTERS[1:10] LETTERS is apparently a built-in character vector. ls() and objects

Re: [R] problem with dir() in R-2.1.0?

2005-04-25 Thread Douglas Grove
The new version of R has begun enforcing rules on regular expressions. Your pattern is not a valid regular expression, hence it no longer works. The meaning of '*' is with respect to a preceding character, hence it is ill-defined without one. On Mon, 25 Apr 2005, Ye, Bin wrote: Hi, I

Re: [R] How about a mascot for R?

2004-12-04 Thread Douglas Grove
When I think of New Zealand I think Rabbit :) How 'bout something like the Monty Python rabbit from the Holy Grail (nasty pointy teeth..., look at the bones!) Doug __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] inverse function of order()

2004-10-04 Thread Douglas Grove
An alternate method that saves having to use order() again is r[o] - r Doug On Mon, 2004-10-04 at 15:21, Wolfram Fischer wrote: I have: d - sample(10:100, 9) o - order(d) r - d[o] How I can get d (in the original order), knowing only r and o? Thanks - Wolfram

Re: [R] alternate rank method

2004-06-29 Thread Douglas Grove
] on Mon, 28 Jun 2004 10:59:26 +0200 (CEST) writes: Torsten On Fri, 25 Jun 2004, Douglas Grove wrote: I should have specified an additional constraint: I'm going to need to use this repeatedly on large vectors (length 10^6), so something efficient is needed

Re: [R] ties in runif() output

2004-06-26 Thread Douglas Grove
On Sat, 26 Jun 2004, Prof Brian Ripley wrote: On Fri, 25 Jun 2004, Douglas Grove wrote: I get ties in output from runif() when I generate as few as 10^5 variates and get quite a lot when I generate 10^6. Is this expected?? It should have been. I haven't seen any duplication

[R] alternate rank method

2004-06-25 Thread Douglas Grove
Hi, I'm wondering if anyone can point me to a function that will allow me to do a ranking that treats ties differently than rank() provides for? I'd like a method that will assign to the elements of each tie group the largest rank. An example: For the vector 'v', I'd like the method to

Re: [R] alternate rank method

2004-06-25 Thread Douglas Grove
I should have specified an additional constraint: I'm going to need to use this repeatedly on large vectors (length 10^6), so something efficient is needed. On Fri, 25 Jun 2004, Sundar Dorai-Raj wrote: Douglas Grove wrote: Hi, I'm wondering if anyone can point me to a function

[R] ties in runif() output

2004-06-25 Thread Douglas Grove
I get ties in output from runif() when I generate as few as 10^5 variates and get quite a lot when I generate 10^6. Is this expected?? I haven't seen any duplication with rnorm(10^6), but see varying amounts of duplication using rexp(), rbeta() and rgamma(). I would have thought that there'd

Re: [R] predict function

2004-02-13 Thread Douglas Grove
You can't use this anymore. The function predict() has a method for loess objects, but there is no longer an available function called predict.loess. So just replace predict.loess with predict. On Fri, 13 Feb 2004, Thomas Jagoe wrote: I am using R to do a loess normalisation procedure. In

Re: [R] Windows Memory Issues

2003-12-08 Thread Douglas Grove
On Sat, 6 Dec 2003, Prof Brian Ripley wrote: I think you misunderstand how R uses memory. gc() does not free up all the memory used for the objects it frees, and repeated calls will free more. Don't speculate about how memory management works: do your homework! Are you saying that

Re: [R] Kmeans again

2003-06-06 Thread Douglas Grove
I'm sorry to insist but I still think there is something wrong with the function kmeans. For instance, let's try the same small example: dados-matrix(c(-1,0,2,2.5,7,9,0,3,0,6,1,4),6,2) I will choose observations 3 and 4 for initial centers and just one iteration. The results are

[R] removing leading/trailing blanks

2003-02-19 Thread Douglas Grove
Hi, What's the best way of dropping leading or trailing blanks from a character string? The only thing I can think of is using sub() to replace blanks with null strings, but I don't know if there is a better way (I also don't know how to represent the trailing blank in a regular expression).

Re: [R] dataframe subsetting behaviour

2003-01-22 Thread Douglas Grove
Douglas Grove [EMAIL PROTECTED] writes: Hi, I'm trying to understand a behaviour that I have encountered and can't fathom. Here's some code I will use to illustrate the behaviour: # start with some data frame a having some named columns a - data.frame(a=rep(1,3),c=rep