Re: [R] Using model operator in stepwise function's upper scope formula

2004-10-05 Thread Prof Brian Ripley
`.' means `what is already there'. In your case, .^2 is 1^2 which is 1, so it behaves correctly. Only in a *fit* involving a *data* argument does `.' mean `the rest of the variables'. On Mon, 4 Oct 2004, Yu Shao wrote: Hello: I am doing forward stepwise analysis on the glm model. I am

AW: AW: [R] constructing specially ordered factor

2004-10-05 Thread Khamenia, Valery
Please follow the posting guide and do your homework before posting, 1. my last homework in university was done a lot of years ago. 2. I always try to follow posting guide. An object of the same type of 'x'. but if an element is equal to one with a smaller index, it is removed.

Re: [R] installation help for mac os x

2004-10-05 Thread Prof Brian Ripley
There is a binary installation available at http://cran.r-project.org/bin/macosx/ so do you actually need to be building from the sources? If you do, your immediate problem is installing Tk on MacOS X, and that's not something relevant to R-help. However, Tk on Unix needs X11, whose

[R] conditional logistic regression

2004-10-05 Thread Eman Alissa
Hi all I've got a case-control study, matched for age 1:1. I need to run a conditional logistic regression using SPSS version (11.5). I was told that it can be performed using cox regression model. However, I can not figure where the independent variables (numeric and categoric) should go? what

[R] conditional logistic regression

2004-10-05 Thread Eman Alissa
Hi all I've got a case-control study, matched for age 1:1. I need to run a conditional logistic regression using SPSS version (11.5). I was told that it can be performed using cox regression model. However, I can not figure where the independent variables (numeric and categoric) should go? what

Re: [R] BDS.TEST

2004-10-05 Thread Uwe Ligges
Savano wrote: UseRs, I want to do a bds.test but the function return this : bds.test(erro.exp,m=15); Error in as.vector(x, mode = double) : (list) object cannot be coerced to double How can I fix this problem? By specifying an object that is expected by bds.test() (in package tseries). Let me

Re: [R] A newbye question : Creating a grey palette

2004-10-05 Thread Arne Henningsen
On Monday 04 October 2004 20:04, Mike Prager wrote: At 11:09 AM 10/04/2004, you wrote: Hi all I'd like to create a grey palette for a filled.contour() from blank (smallest values) to black (large values) I have used somethig like this with bar plots: colvec - gray(sqrt(seq(from=0.05,

Re: [R] conditional logistic regression

2004-10-05 Thread Peter Dalgaard
Eman Alissa [EMAIL PROTECTED] writes: Hi all I've got a case-control study, matched for age 1:1. I need to run a conditional logistic regression using SPSS version (11.5). I was told that it can be performed using cox regression model. However, I can not figure where the independent

Re: [R] R 2.0.0 is released

2004-10-05 Thread Barry Rowlingson
Gabor Grothendieck wrote: Congratulations to the R team and all involved for reaching the 2.0.0 milestone. The progress of R is truly astounding. A milestone is something that tells you how far it is to where you are going. With R-2.0.0, have we arrived? Barry

[R] save print survfit object to data frame

2004-10-05 Thread Ruud H. Koning
Hello, I have estimated a survival model with six strata: model.b - survfit(Surv(time=start.tijd,time2=eind.tijd2,event=va)~strata(product.code) , data=wu.wide) I would like to save the output of print(model.b,print.n=records,show.rmean=FALSE) in a dataframe so that I can export it later.

Re: [R] R 2.0.0 is released

2004-10-05 Thread Peter Dalgaard
Barry Rowlingson [EMAIL PROTECTED] writes: Gabor Grothendieck wrote: Congratulations to the R team and all involved for reaching the 2.0.0 milestone. The progress of R is truly astounding. A milestone is something that tells you how far it is to where you are going. With R-2.0.0,

[R] Installation Package gregmisc nicht möglich?!?

2004-10-05 Thread Michael Weber
Hallo zusammen. Da ich R zur Erstellung meiner wissenschaftlichen Arbeit brauche versuchte ich dies heute zu installieren. Zunächst in der Vrsion 1.9.1 (rw1091.exe). Ich benötige das Package gregmisc und installierte dies von CRAN. Bei der Installation tritt folgende Meldung auf: trying URL

Re: [R] Installation Package gregmisc nicht möglich?!?

2004-10-05 Thread Uwe Ligges
Michael Weber wrote: Hallo zusammen. Bonjour! Da ich R zur Erstellung meiner wissenschaftlichen Arbeit brauche versuchte ich dies heute zu installieren. Zunächst in der Vrsion 1.9.1 (rw1091.exe). Ich benötige das Package gregmisc und installierte dies von CRAN. Bei der Installation tritt

Re: [R] Installation Package gregmisc nicht möglich?!?

2004-10-05 Thread Prof Brian Ripley
gregmisc is no longer a package. Note carefully bundle 'gregmisc' successfully unpacked and MD5 sums checked ^^ As for the rest, please write in English, the language of the list. On Tue, 5 Oct 2004, Michael Weber wrote: Hallo zusammen. Da ich R zur Erstellung meiner

[R] Bug in optim - way to solve problem?

2004-10-05 Thread Jon Olav Skoien
Hi, I want to automatically fit variograms to a large number of different sample data sets, and call the funtion likfit (in package geoR) from within a for-loop. likfit does again call optim. After ssuccessfully fitting variograms to some of the data sets, the procedure crashes and I get the

Re: [R] R 2.0.0 is released

2004-10-05 Thread Jim Lemon
Peter Dalgaard wrote: ... Besides, how do you arrive at a moving target? Zeno sez: Time of flight = (Location(target)-Location(archer))/(Velocity(arrow)-Velocity(target)) where Velocity(arrow)Velocity(target) conveniently avoiding all those difficult angling shots, windage and the thousand

Re: [R] R 2.0.0 is released

2004-10-05 Thread Andrew Robinson
Not to mention relativity. R is developing pretty quickly. Andrew conveniently avoiding all those difficult angling shots, windage and the thousand insults to which slings and arrows are heir. Jim __ [EMAIL PROTECTED] mailing list

Re: [R] Bug in optim - way to solve problem?

2004-10-05 Thread Peter Dalgaard
Jon Olav Skoien [EMAIL PROTECTED] writes: Hi, I want to automatically fit variograms to a large number of different sample data sets, and call the funtion likfit (in package geoR) from within a for-loop. likfit does again call optim. After ssuccessfully fitting variograms to some of the

Re: [R] R 2.0.0 is released

2004-10-05 Thread Marc Schwartz
On Tue, 2004-10-05 at 05:43, Peter Dalgaard wrote: Barry Rowlingson [EMAIL PROTECTED] writes: Gabor Grothendieck wrote: Congratulations to the R team and all involved for reaching the 2.0.0 milestone. The progress of R is truly astounding. A milestone is something that

RE: [R] Making a 'joint distribution'?

2004-10-05 Thread John Fox
Dear Ajay, There may be a function that does this already, but if not, it not hard to do, at least for two-way tables: Table - function(x, y) { tab - table(x, y) tab - cbind(tab, rowSums(tab)) tab - rbind(tab, colSums(tab)) rownames(tab)[nrow(tab)] -

Re: Re: [R] gnls or nlme : how to obtain confidence intervals of fitted values

2004-10-05 Thread Rogers, James A [PGRD Groton]
I believe what Pierre means to be asking for are prediction intervals, or possibly tolerance intervals, which are different from confidence intervals. A great reference is: Hahn G and Meeker WQ: Statistical Intervals. John Wiley and Sons, New York, 1991 For example, in a one-sample Normal

Re: [R] installation help for mac os x

2004-10-05 Thread Thomas Lumley
On Mon, 4 Oct 2004, Nancy Hornewer wrote: (4) Didn't install X11 SDK package because it was optional and I don't think I need that (just want to run this on my machine) (5) Installed tcl8.4.7 - no problems (6) Tried installing tk8.4.7 but received many many error messages when I typed make. Here

Re: [R] Making a 'joint distribution'?

2004-10-05 Thread Thomas Lumley
On Sun, 3 Oct 2004, Ajay Shah wrote: Suppose I make two discrete variables -- D - data.frame(f1=sample(1:5,100,replace=T), f2=sample(1:5,100,replace=T)) sniP which is all great. But how do I produce the typical presentation of the joint distribution where we put the marginal distributions in the

Re: AW: AW: [R] constructing specially ordered factor

2004-10-05 Thread Thomas Lumley
On Tue, 5 Oct 2004, Khamenia, Valery wrote: BTW, do you mean that current hash-based implementation brings *clearly* better performance than any O(n*log(n)) sort based algorithm? If I have correctly understood src/main/unique.c then current hash function is niether minimal perfect hash function

Re: [R] save print survfit object to data frame

2004-10-05 Thread Thomas Lumley
On Tue, 5 Oct 2004, Ruud H. Koning wrote: Hello, I have estimated a survival model with six strata: model.b - survfit(Surv(time=start.tijd,time2=eind.tijd2,event=va)~strata(product.code) , data=wu.wide) I would like to save the output of print(model.b,print.n=records,show.rmean=FALSE) in a

[R] cat function within a loop

2004-10-05 Thread Tatsuki Koyama
I have a 'cat' function within a for loop. I would like it to print out the result everytime it goes through the for loop so that I can monitor the progress, but it only prints out (execute the cat function) once at the very end of the for loop. A simple example: for(i in 1:10){

Re: [R] How might one write this better?

2004-10-05 Thread Tony Plate
The trick to vectorizing asset - numeric(T+1) for (t in 1:T) asset[t+1] - cont[t] + ret[t]*asset[t] is to expand it algebraically into a sum of terms like: asset[4] = cont[3] + ret[3] * cont[2] + ret[3] * ret[2] * cont[1] (where the general case should be reasonably obvious, but is more work to

Re: [R] cat function within a loop

2004-10-05 Thread Sundar Dorai-Raj
Tatsuki Koyama wrote: I have a 'cat' function within a for loop. I would like it to print out the result everytime it goes through the for loop so that I can monitor the progress, but it only prints out (execute the cat function) once at the very end of the for loop. A simple example: for(i in

Re: [R] cat function within a loop

2004-10-05 Thread Uwe Ligges
Tatsuki Koyama wrote: I have a 'cat' function within a for loop. I would like it to print out the result everytime it goes through the for loop so that I can monitor the progress, but it only prints out (execute the cat function) once at the very end of the for loop. A simple example: for(i in

Re: [R] cat function within a loop

2004-10-05 Thread Dimitris Rizopoulos
Just press Ctrl+W (it controls buffered output) if you are using the RGui. I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/396887 Fax:

Re: [R] cat function within a loop

2004-10-05 Thread Prof Brian Ripley
If perchance you are using Windows (and specifically Rgui) and not telling us (as the posting guide asks you to), do read the rw-FAQ Q6.3 (as the posting guide also asks you to). On Tue, 5 Oct 2004, Tatsuki Koyama wrote: I have a 'cat' function within a for loop. I would like it to print out

[R] constrOptim convergence

2004-10-05 Thread Shuangge Ma
Hello, I got a question with the R function constrOptim. From the R help, it says that the return values of constrOptim are the same as optim. For the return value convergence of the function optim, the values should be 0, 1, 10, 51 and 52. See

[R] Need R Version 1.8.0 or earlier

2004-10-05 Thread Michael Weber
Hello. I need R in Version 1.8.0 or earlier. I also need the packages foreign, x-table and gregmisc for this version. Does anyone know where I can get it? Greetings Michael Weber [[alternative HTML version deleted]] __ [EMAIL PROTECTED]

[R] Need R Version 1.8.0 or earlier

2004-10-05 Thread Vito Ricci
Hi, you didn't specify on which OS (Linux, Win, Mac) would run R 1.8. For R souces see: http://cran.r-project.org/src/base/R-1/ Best Vito You wrote: Hello. I need R in Version 1.8.0 or earlier. I also need the packages foreign, x-table and gregmisc for this version. Does anyone know where I

Re: [R] Need R Version 1.8.0 or earlier

2004-10-05 Thread Uwe Ligges
Michael Weber wrote: Hello. I need R in Version 1.8.0 or earlier. I also need the packages foreign, x-table and gregmisc for this version. Does anyone know where I can get it? REALLY? The R-1.8.x sources are available at: Your-CRAN-Mirror/src/base/R-1/ Old packages sources are available at:

Re: [R] Need R Version 1.8.0 or earlier

2004-10-05 Thread Barry Rowlingson
Michael Weber wrote: Hello. I need R in Version 1.8.0 or earlier. I also need the packages foreign, x-table and gregmisc for this version. Does anyone know where I can get it? Start here: http://www.r-project.org/ Click CRAN. Choose a mirror. Follow the Source code of older versions of R is

Re: [R] Computing and testing transition probabilities?

2004-10-05 Thread Spencer Graves
Regarding how to compile the table, have you considered something like the following: Trans - array(0, dim=c(3,3)) for(i in 1:(n-1)) + if(D$names[i]==D$names[i+1]) + (Trans[D$f[i], D$f[i+1]] - Trans[D$f[i], D$f[i+1]]+1) Trans Trans - array(0, dim=c(3,3)) for(i in 1:(n-1)) +

Re: [R] multiple dimensional diag()

2004-10-05 Thread Peter Wolf
Robin Hankin wrote: hi again Peter thanks for this. Now we've got the legal stuff sorted, on to business! One of the reasons I wanted the function was to to multidimensional moving- window averaging, and for this I needed to be able to call a.block.diag(a,b) when a and b might have one or more

[R] correct my method of estimating mean of two POSIXlt data frames

2004-10-05 Thread gotrout
Hello, I searched the archives but could not come to a solution. I have to two columns of information t_start_cdt looks like: t_start_cdt[1:4] [1] 2003-07-09 11:02:25 2003-07-09 11:10:25 2003-07-09 11:30:25 [4] 2003-07-09 12:00:25 class(t_start_cdt) [1] POSIXt POSIXlt t_end_cdt looks like:

Re: [R] Reading Version 4 .sdd files

2004-10-05 Thread John Chambers
John Chandler wrote: Dear R-Help, I've never had any trouble importing data into R until I had to import an .sdd file for a class. The file can be found here: http://www.math.umt.edu/steele/Math%20549/Farms.sdd. It begins with the line ## Dump S Version 4 Dump ##. I first attempted read.S

[R] Deleting a particular row

2004-10-05 Thread S Peri
Hi, I have a data frame. E.g: Fertility Agriculture Courtelary80.217.0 Delemont 83.145.1 Franches-Mnt 92.539.7 How can I delete : Courtelary80.217.0 Thanks. P ___

Re: [R] Deleting a particular row

2004-10-05 Thread Sundar Dorai-Raj
S Peri wrote: Hi, I have a data frame. E.g: Fertility Agriculture Courtelary80.217.0 Delemont 83.145.1 Franches-Mnt 92.539.7 How can I delete : Courtelary80.217.0 Thanks. P See ?subset. Assuming your data is called

Re: [R] constrOptim convergence

2004-10-05 Thread Thomas Lumley
On Tue, 5 Oct 2004, Shuangge Ma wrote: Hello, I got a question with the R function constrOptim. From the R help, it says that the return values of constrOptim are the same as optim. For the return value convergence of the function optim, the values should be 0, 1, 10, 51 and 52. See

Re: [R] Deleting a particular row

2004-10-05 Thread Peter Dalgaard
Sundar Dorai-Raj [EMAIL PROTECTED] writes: S Peri wrote: Hi, I have a data frame. E.g: Fertility Agriculture Courtelary80.217.0 Delemont 83.145.1 Franches-Mnt 92.539.7 How can I delete : Courtelary80.2

RE: [R] correct my method of estimating mean of two POSIXlt data frames

2004-10-05 Thread Gabor Grothendieck
gotrout at gmail.com writes: : : Hello, I searched the archives but could not come to a solution. I : have to two columns of information : : t_start_cdt looks like: : t_start_cdt[1:4] : [1] 2003-07-09 11:02:25 2003-07-09 11:10:25 2003-07-09 11:30:25 : [4] 2003-07-09 12:00:25 :

Re: [R] correct my method of estimating mean of two POSIXlt data frames

2004-10-05 Thread gotrout
If a.lt and b.lt are the two vectors of POSIXlt dates then try converting each to POSIXct and unclassing to make each numeric. Take the mean of the two numeric vectors and convert them back to I see. I'm a little confused with the use of class/unclass versus as.XX. For example, instead of

[R] row.name in data.frame

2004-10-05 Thread S Peri
Hi Group, I have a table with column names and row names. Species A B C D E F G Human1 2 3 4 1 0 3 Rat 0 2 3 3 2 1 2 I read this tab delim. text file into R like the following: mydata -read.table('mydata.txt',header=TRUE) mydata Species A B C D 1 Human

Re: [R] R 2.0.0 is released

2004-10-05 Thread Duncan Murdoch
On 04 Oct 2004 17:29:39 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote : I've rolled up R-2.0.0.tar.gz a short while ago. This is a new version with a number of new features. See below for the details. As was the case with R 1.0.0, this new version represents a coming of age more than a radical

Re: [R] correct my method of estimating mean of two POSIXlt data frames

2004-10-05 Thread Prof Brian Ripley
On Tue, 5 Oct 2004 [EMAIL PROTECTED] (but with no name nor signature) wrote: Quoting someone without credit (and therefore in breach of their copyright) If a.lt and b.lt are the two vectors of POSIXlt dates then try converting each to POSIXct and unclassing to make each numeric. Take the

[R] Nelson-Aalen estimator in R

2004-10-05 Thread Wu, Tongtong
Hi, I am taking a survival class. Recently I need to do the Nelson-Aalen estimtor in R. I searched through the R help manual and internet, but could not find such a R function. I tried another way by calculating the Kaplan-Meier estimator and take -log(S). However, the function only provides

Re: [R] row.name in data.frame

2004-10-05 Thread Prof Brian Ripley
?read.table and the R Data Import/Export manual (and An Introduction to R) do all explain this. To use header=TRUE the header should not name the row names column, *OR* you need to add row.names=1 to the call. So just omit `Species'. On Tue, 5 Oct 2004, S Peri wrote: Hi Group, I have a

RE: [R] row.name in data.frame

2004-10-05 Thread Nordlund, Dan
Does this do what you want: mydata -read.table('mydata.txt',header=TRUE, row.names=1) see ?read.table Daniel Nordlund Research and Data Analysis Washington State Department of Social and Health Services P.O. Box 45204 Olympia, WA 98504-5204 -Original Message- From: S Peri

[R] How to install affy package in R?

2004-10-05 Thread saran . 2 . vardhanabhuti
Hello, I am trying to install affy package in R as follow: R CMD INSTALL -l lib ~/rstuffs/affy_1.4.32.tar.gz Then I get an error at the end: Warning message: There is no package called 'Biobase' in: library(package, character.only = TRUE, logical = TRUE,

Re: [R] How to install affy package in R?

2004-10-05 Thread Prof Brian Ripley
You are installing to `lib'. You will only see packages you install there if that is in your R library path (set by R_LIBS), and neither will R CMD INSTALL. This is a question about BioConductor, so please use their mailing list, not the R ones. On Tue, 5 Oct 2004 [EMAIL PROTECTED] wrote:

Re: [R] correct my method of estimating mean of two POSIXlt data frames

2004-10-05 Thread gotrout
My apology for not properly quoting someone. Let me amend my original email. In R version 1.8.1, if I have two objects that look like: t.start.cdt[1:4] [1] 2003-07-09 11:02:25 2003-07-09 11:10:25 2003-07-09 11:30:25 [4] 2003-07-09 12:00:25 class(t.start.cdt) [1] POSIXt  POSIXlt

Re: [R] Nelson-Aalen estimator in R

2004-10-05 Thread Peter Dalgaard
Wu, Tongtong [EMAIL PROTECTED] writes: I am taking a survival class. Recently I need to do the Nelson-Aalen estimtor in R. I searched through the R help manual and internet, but could not find such a R function. I tried another way by calculating the Kaplan-Meier estimator and take

Re: [R] How to get F Distribution values in R

2004-10-05 Thread Kjetil Brinchmann Halvorsen
pio claudio wrote: i tried to use df(x,df1,df2) but the values arent the same when i looked it up in a F Distribution table.. How to get the same F Distribution values in R as in the f table? __ [EMAIL PROTECTED] mailing list

RE: [R] How to get F Distribution values in R

2004-10-05 Thread Liaw, Andy
Have you looked up what df() computes? What did you think the `d' in df() means? Andy From: pio claudio i tried to use df(x,df1,df2) but the values arent the same when i looked it up in a F Distribution table.. How to get the same F Distribution values in R as in the f table?

Re:Re: [R] How to get F Distribution values in R

2004-10-05 Thread pio claudio
is x in df(x,df1,df2) the significance level? the alpha? alpha .05 \v11 2 3 v2 1 161.448 199.500 215.707 2 18.513 19.000 19.164 3 10.128 9.552 9.277 this is a portion of the F distribution table.. sorry, but i still cant figure out how to use

RE: Re: [R] How to get F Distribution values in R

2004-10-05 Thread Liaw, Andy
outer(1:3, 1:3, function(df1, df2) qf(0.95, df1, df2)) [,1] [,2] [,3] [1,] 161.4476 18.51282 10.127964 [2,] 199.5000 19.0 9.552094 [3,] 215.7073 19.16429 9.276628 Andy From: pio claudio is x in df(x,df1,df2) the significance level? the alpha? alpha .05 \v1

Re: [R] correct my method of estimating mean of two POSIXlt data frames

2004-10-05 Thread Gabor Grothendieck
Prof Brian Ripley [EMAIL PROTECTED] writes: : If a.lt and b.lt are the two vectors of POSIXlt dates then try : converting each to POSIXct and unclassing to make each numeric. : Take the mean of the two numeric vectors and convert them back to : : I see. I'm a little confused with the use

[R] Problems with merge

2004-10-05 Thread Vikas Rawal
This issue has been discussed on this list before but the solutions offerred are not satisfactory. So I thought I shall raise it again. I want to merge two datasets which have three common variables. These variables DO NOT have the same names in both the files. In addition, there are two