[R] plot.ts panel function

2006-07-11 Thread Matthias Braeunig
How can I set the ylim in individual panels of a "multiple" plot.ts? The panels are all scaled to fully fit the series inside. But I need specific scales, and colors Here is an example: plot.ts(cbind(1:10,1:10/10),ylim=c(0,3))# ylim has no effect Can someone more knowledgable please

Re: [R] PDF version of Chinese translations of the manual "An Introduction to R"

2006-07-11 Thread ronggui
That's a great news for all Chinese useR. 2006/7/12, Guohui Ding <[EMAIL PROTECTED]>: Dear All, I distributed the HTML style one year ago ( http://www.biosino.org/pages/newhtm/r/schtml and http://www.biosino.org/pages/newhtm/r/tchtml ). Now I polished it, and rewrote it with Latex. You c

[R] Rgnome in Ubuntu

2006-07-11 Thread Steve Lane
Hi I am trying to set up Rgnome in Ubuntu (Dapper) and when I use the instructions: /path/to/gnomeGUI/configure R_HOME=/path/to/R/installation make make install I get an error message when I try to 'make' as follows: /usr/local/lib64/R/etc/Makeconf:5: /make/vars.mk: No such file or di

Re: [R] Date Format

2006-07-11 Thread Don MacQueen
If I understand your question correctly, then my suggestion is to try table( format(datetest), other.variable) instead of table(datetest, other.variable) -Don At 4:23 PM + 7/11/06, pierre clauss wrote: >Hi everybody, >I need your precious help for, I think, a simple request, but I do >

[R] PDF version of Chinese translations of the manual "An Introduction to R"

2006-07-11 Thread Guohui Ding
Dear All, I distributed the HTML style one year ago ( http://www.biosino.org/pages/newhtm/r/schtml and http://www.biosino.org/pages/newhtm/r/tchtml ). Now I polished it, and rewrote it with Latex. You can download it from the URL: http://www.biosino.org/R/R-doc/ ( http://www.biosino.org/R/

Re: [R] help in vectorization

2006-07-11 Thread Gabor Grothendieck
Try this: with(merge(dtf, dtf2), data.frame(y, m, inc = inc/def)) On 7/11/06, Dimitri Szerman <[EMAIL PROTECTED]> wrote: > Hi, > > I have two data frames. One is like > > > dtf = data.frame(y=c(rep(2002,4), rep(2003,5)), > + m=c(9:12, 1:5), > + def=c(.74,.75,.76,

[R] help in vectorization

2006-07-11 Thread Dimitri Szerman
Hi, I have two data frames. One is like > dtf = data.frame(y=c(rep(2002,4), rep(2003,5)), + m=c(9:12, 1:5), + def=c(.74,.75,.76,.78,.80,.82,.85,.85,.87)) and the other dtf2 = data.frame(y=rep( c(2002,2003),20), m=c(trunc(runif(20,1,5)),trunc(r

[R] PDF version of Chinese translations of the manual "An Introduction to R"

2006-07-11 Thread Guohui Ding
Dear All, I distributed the HTML style one year ago ( http://www.biosino.org/pages/newhtm/r/schtml and http://www.biosino.org/pages/newhtm/r/tchtml). Now I polished it, and rewrote it with Latex. You can download it from the URL: http://www.biosino.org/R/R-doc/ ( http://www.biosino.org/R/R

Re: [R] 0* log(0) should be zero but NaN

2006-07-11 Thread Gabor Grothendieck
Try this: p <- 0:10/10 p * log2(p + !p) On 7/11/06, Taka Matzmoto <[EMAIL PROTECTED]> wrote: > Dear R-users > > >prob <- c(0.5,0.4,0.3,0.1,0.0) > >cal <- prob * log(prob,base=2) > >cal > [1] -0.500 -0.5287712 -0.5210897 -0.3321928NaN > > Is there any way to change NaN to zero ? > > I

Re: [R] Question on partial effect

2006-07-11 Thread Guo Wei-Wei
Than you, Gavin. You helped me out a lot of problems. Thank you very much! Wei-Wei 2006/7/12, Gavin Simpson <[EMAIL PROTECTED]>: > On Wed, 2006-07-12 at 00:51 +0800, Guo Wei-Wei wrote: > > Thank you, Gavin. I think that might be what I need. But I'm a little > > bit wandering what's the scale

Re: [R] use of NULL environment is deprecated?

2006-07-11 Thread Duncan Murdoch
On 7/11/2006 6:59 PM, Patrick Connolly wrote: > On Tue, 11-Jul-2006 at 06:41PM -0400, Duncan Murdoch wrote: > > [] > > |> > |> options(warn=2) will convert warnings into errors, so traceback will work. > |> > |> A common situation where I've seen that error is with binary saves from > |> e

Re: [R] 0* log(0) should be zero but NaN [Broadcast]

2006-07-11 Thread Liaw, Andy
Try: R> (cal <- prob * log(ifelse(prob == 0, 1, prob), base=2)) [1] -0.500 -0.5287712 -0.5210897 -0.3321928 0.000 Andy From: Taka Matzmoto > > Dear R-users > > >prob <- c(0.5,0.4,0.3,0.1,0.0) > >cal <- prob * log(prob,base=2) > >cal > [1] -0.500 -0.5287712 -0.5210897 -0.3321928

Re: [R] generating clustered data

2006-07-11 Thread Hamilton, Cody
Brian, What about creating the covariance matrix with the help of the kronecker product? For instance, suppose your intercepts are ~ N(0,var1) and your residual errors are ~ N(0,var2). Suppose further that you want 10 clusters of 5 observations each. I believe you can create the overall covari

Re: [R] Query about getting averages across a certain parameter in a table

2006-07-11 Thread jim holtman
> x <- " + cluster_ac clockrate age class + 7337 0.19 0.001 alpha_proteins + 7888 0.21 0.78 beta_proteins + 7337 0.39 0.001 alpha_proteins + 7888 0.41 0.78 beta_proteins + 7337 0.59 0.001 alpha_proteins + 7888 0.6

Re: [R] use of NULL environment is deprecated?

2006-07-11 Thread Patrick Connolly
On Tue, 11-Jul-2006 at 06:41PM -0400, Duncan Murdoch wrote: [] |> |> options(warn=2) will convert warnings into errors, so traceback will work. |> |> A common situation where I've seen that error is with binary saves from |> earlier versions of R being loaded into current versions. For ex

Re: [R] 0* log(0) should be zero but NaN

2006-07-11 Thread jim holtman
> prob <- c(0.5,0.4,0.3,0.1,0.0) > cal <- prob * log(prob,base=2) > cal [1] -0.500 -0.5287712 -0.5210897 -0.3321928NaN > cal[is.nan(cal)] <- 0 > cal [1] -0.500 -0.5287712 -0.5210897 -0.3321928 0.000 > On 7/11/06, Taka Matzmoto <[EMAIL PROTECTED]> wrote: > > Dear R-users > > >

Re: [R] use of NULL environment is deprecated?

2006-07-11 Thread Sundar Dorai-Raj
Patrick Connolly wrote: > ]> version >_ > platform x86_64-unknown-linux-gnu > arch x86_64 > os linux-gnu > system x86_64, linux-gnu > status

Re: [R] use of NULL environment is deprecated?

2006-07-11 Thread Duncan Murdoch
On 7/11/2006 6:27 PM, Patrick Connolly wrote: > ]> version >_ > platform x86_64-unknown-linux-gnu > arch x86_64 > os linux-gnu > system x86_64, linux-gnu > status

[R] use of NULL environment is deprecated?

2006-07-11 Thread Patrick Connolly
]> version _ platform x86_64-unknown-linux-gnu arch x86_64 os linux-gnu system x86_64, linux-gnu status major 2

[R] generating clustered data

2006-07-11 Thread Brian Perron
Hello R folks, Does anybody have code to share for generating (via simulation) clustered data? The type of data I am looking to simulate would allow fitting of a multilevel model with random intercepts. I looked at the mvtnorm package but am not quite sure how to create clusters. (Can this

[R] 0* log(0) should be zero but NaN

2006-07-11 Thread Taka Matzmoto
Dear R-users >prob <- c(0.5,0.4,0.3,0.1,0.0) >cal <- prob * log(prob,base=2) >cal [1] -0.500 -0.5287712 -0.5210897 -0.3321928NaN Is there any way to change NaN to zero ? I did come up with this by applying Ripley's relpy to my previous question cal <-prob*log(pmax(prob,0.0001),b

[R] August R/Splus course @ 5 locations *** R/Splus Fundamentals and Programming Techniques

2006-07-11 Thread elvis
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] (no subject)

2006-07-11 Thread Ben Fairbank
Well, it's a little inelegant, but since the amount of information is the same in events that are certain to occur and certain not to occur, you could add the line prob[prob==0] <- 1 after you set up the prob vector, which would take care of the problem. Ben Fairbank -Original Message---

[R] (no subject)

2006-07-11 Thread Taka Matzmoto
Dear R-users >prob <- c(0.5,0.4,0.3,0.1,0.0) >cal <- prob * log(prob,base=2) >cal [1] -0.500 -0.5287712 -0.5210897 -0.3321928NaN Is there any way to change NaN to zero ? Thank you Taka __ R-help@stat.math.ethz.ch mailing list https://stat

[R] script problem to obtain pairs of overlap values

2006-07-11 Thread Rogério Rosa da Silva
Dear, I wrote a code to estimate the overlap between two kernel distributions. The script must estimates the overlap among each columns of data frame. With S sampled species (columns) in my data frame, I want obtain S(S-1)/2 pairs of overlap values between species. However, the code is not well wr

Re: [R] R newbie: logical subsets

2006-07-11 Thread Gabor Grothendieck
Try this, using the built in anscombe data set: anscombe[!rowSums(abs(scale(anscombe)) > 2),] On 7/11/06, Joshua Tokle <[EMAIL PROTECTED]> wrote: > Hello! I'm a newcomer to R hoping to replace some convoluted database > code with an R script. Unfortunately, I haven't been able to figure out >

[R] R newbie: logical subsets

2006-07-11 Thread Joshua Tokle
Hello! I'm a newcomer to R hoping to replace some convoluted database code with an R script. Unfortunately, I haven't been able to figure out how to implement the following logic. Essentially, we have a database of transactions that are coded with a geographic locale and a type. These are be

[R] detach

2006-07-11 Thread Gabor Grothendieck
We try the following: search() as.Date(1) zoo:::as.Date.numeric under three circumstances: 1. on a fresh session 2. after issuing library(zoo) noting that as.Date.numeric is provided by zoo 3. after detaching zoo as.Date(1) fails on #1 but succeeds in #2 and #3. Should it not fail in #3 since

[R] Query about getting averages across a certain parameter in a table

2006-07-11 Thread lalitha viswanath
Hi I have a table that goes data cluster_ac clockrate age class 7337 0.9 0.001 alpha_proteins 7888 0.1 0.78 beta proteins etc The class column can have 7-8 different unique values While the clockrate and age columns are floats varying from 0 to 1. I wish to get

Re: [R] Question on partial effect

2006-07-11 Thread Gavin Simpson
On Wed, 2006-07-12 at 00:51 +0800, Guo Wei-Wei wrote: > Thank you, Gavin. I think that might be what I need. But I'm a little > bit wandering what's the scale of resid(mod). Is it > scale(dist)/scale(speed), for example kilometer / (kilometer per > hour)? or something else? > > Thank you very much

Re: [R] Date Format

2006-07-11 Thread Roger D. Peng
Try structure(11328, class = "Date") or just class(datetest) <- "Date" -roger pierre clauss wrote: > Hi everybody, > I need your precious help for, I think, a simple request, but I do not manage > to solve this. > > When I use a "table" function with dates in the rows, the rows are coerced

Re: [R] problem of fixed-formated output using sprintf

2006-07-11 Thread jim holtman
Are you sure it is the sprintf vs. write.table? I constructed a dataframe of your size and it took less than 1 second to do the sprintf: > system.time(df.fmt <- sprintf("%2s%2s%4.2f", df$V1, df$V2, df$V3)) [1] 0.70 0.00 0.73 NA NA > str(df) `data.frame': 67944 obs. of 34 variables: $ V1 :

Re: [R] storing the estimates from lmer

2006-07-11 Thread Douglas Bates
On 7/11/06, Doran, Harold <[EMAIL PROTECTED]> wrote: > You need the VarCorr function. I think you mean that lmer is in the > Matrix package. Currently lmer is in the Matrix package. The plan is to move it back to the lme4 package when interpackage linking has been added to R - perhaps as early as

Re: [R] Date Format

2006-07-11 Thread Gabor Grothendieck
Try this: library(zoo) as.Date(11328) See the Help Desk article in R News 4/1 for more on dates. On 7/11/06, pierre clauss <[EMAIL PROTECTED]> wrote: > Hi everybody, > I need your precious help for, I think, a simple request, but I do not manage > to solve this. > > When I use a "table" functi

Re: [R] Question on partial effect

2006-07-11 Thread Guo Wei-Wei
Thank you, Gavin. I think that might be what I need. But I'm a little bit wandering what's the scale of resid(mod). Is it scale(dist)/scale(speed), for example kilometer / (kilometer per hour)? or something else? Thank you very much! Wei-Wei 2006/7/12, Gavin Simpson <[EMAIL PROTECTED]>: > On Tue

Re: [R] Question on partial effect

2006-07-11 Thread Gavin Simpson
On Tue, 2006-07-11 at 23:51 +0800, Guo Wei-Wei wrote: > Dear all, > > I don't know what's my question is called. I have a performance > variable A, such as sales. And I have another variable B, let's say > establish time of firm. I want to create the third variable that is > sales without the effe

[R] Date Format

2006-07-11 Thread pierre clauss
Hi everybody, I need your precious help for, I think, a simple request, but I do not manage to solve this. When I use a "table" function with dates in the rows, the rows are coerced to number after the table function. So I need to transform the row names into date format. But I do not manage.

[R] problem of fixed-formated output using sprintf

2006-07-11 Thread YIHSU CHEN
Dear R users: I'm trying to generate a output file with fixed format using function "sprintf" in R. However, the execution time in R is very long even the toy data (smaller size df) seems to work fine. The syntax that I used is as follows: df.fmt <- sprintf("%2s%2s%2.4f", df$v1, df$v2, df$v3) w

Re: [R] DIfferent lengths

2006-07-11 Thread Jing Gao
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] tcltk: help pop-up

2006-07-11 Thread javier garcia-pintado
Hi all; Please, does anyone have a piece of R-tcltk code that includes a help pop-up for any item and could send it as an example? thanks and best regards, Javier -- Javier García-Pintado Institute of Earth Sciences Jaume Almera (CSIC) Lluis Sole Sabaris s/n, 08028 Barcelona Phone: +34 9340954

[R] Question on partial effect

2006-07-11 Thread Guo Wei-Wei
Dear all, I don't know what's my question is called. I have a performance variable A, such as sales. And I have another variable B, let's say establish time of firm. I want to create the third variable that is sales without the effect of establish time. Maybe it can be called partial effect proble

Re: [R] storing the estimates from lmer

2006-07-11 Thread Doran, Harold
You need the VarCorr function. I think you mean that lmer is in the Matrix package. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of prabhu bhaga > Sent: Tuesday, July 11, 2006 11:19 AM > To: r-help@stat.math.ethz.ch > Subject: [R] storing the estima

Re: [R] Proportional Hazard Function and Competing risks

2006-07-11 Thread Ravi Varadhan
Hi, If you are interested in building regression models for the sub-distribution functions (or cumulative incidence function), then you may want to look at the "cmprsk" package by Gray. It is based on the article: Fine and Gray (JASA 1999). There is also the approach based on multi-state models

[R] storing the estimates from lmer

2006-07-11 Thread prabhu bhaga
Dear all, I'm trying to store/extract the mean& standard error of the fixed effects parameter and the variance of the random effects parameter from "lmer" procedure from mlmre4 package developed by bates n pinheiro. while storing fixed effects parameter is straight forward, the same is not true f

[R] Error With TIFF of Plots

2006-07-11 Thread justin rapp
All, I am using R on Mac OS X Tiger. I have assembled some graphs through quartz and cut and pasted them into MSWord files on my Mac. I then emailed the Word document containing the graphs to a Windows computer. Upon opening the document, I received an error message telling me that the graphic

Re: [R] Proportional Hazard Function and Competing risks

2006-07-11 Thread Thomas Lumley
On Tue, 11 Jul 2006, [EMAIL PROTECTED] wrote: > How can I model coxph() in combination with competing risks > > i.e. I have two events and for event the object will leave the data set. > So : > > Coxph(Surv(time,event)~) the event is for all my objects 1. > > How can I model this? There is not

[R] Multiple tests on 2 way-ANOVA

2006-07-11 Thread Grathwohl, Dominik, LAUSANNE, NRC-BAS
Dear r-helpers, I have a question about multiple testing. Here an example that puzzles me: All matrixes and contrast vectors are presented in treatment contrasts. 1. example: library(multcomp) n<-60; sigma<-20 # n = sample size per group # sigma standard deviation of the residuals cov1 <- matrix

Re: [R] --no-save and --save toggle from inside R? + BATCH stderr

2006-07-11 Thread Prof Brian Ripley
This sort of thing is contrary to the Unix spirit. It gives the user no choice but to be told that there is a non-zero error code, whereas it is really easy for the user to wrap the command in his/her own script that reports the error code in whatever form is desired. The Unix idea is to think

Re: [R] Misunderstanding with lines (or elsewhere)

2006-07-11 Thread Gavin Simpson
On Tue, 2006-07-11 at 15:39 +0200, [EMAIL PROTECTED] wrote: > Prof Brian Ripley a écrit : > > > Think about the coordinate system you are using: if you don't set the > > margins to zero you will see what it is. > > I suggest you supply x and y to image() to set the coordinate system to > > what

[R] help on Rserve

2006-07-11 Thread zana adeb
Dear All, I'm calling R functions from Java by using Rserve, There is an exemple about dislay graphics in Java, this exemple is very difficult for me, I don't understand it... Could someone give me a simple example What I want is putting the graphe in a file to display it after tha

Re: [R] Second Partial Derivatives

2006-07-11 Thread Ravi Varadhan
If you'd like to have accurate second derivatives, then check out the "numDeriv" package, and in particular, the function "hessian". The derivatives are based on Richardson extrapolation, and can be evaluated to a very high degree of accuracy. Ravi. --

Re: [R] Proportional Hazard Function and Competing risks

2006-07-11 Thread Heinz Tuechler
Maybe you find that thread helpful: http://tolstoy.newcastle.edu.au/R/help/00b/1426.html Heinz At 12:59 11.07.2006 +0200, [EMAIL PROTECTED] wrote: > > >How can I model coxph() in combination with competing risks > >i.e. I have two events and for event the object will leave the data set. >So : >

Re: [R] non positive-definite G matrix in mixed models: bootstrap?

2006-07-11 Thread Doran, Harold
There is a paper by Rogosa and Saner which shows some equivalences in what you are doing under certain conditions. They show similarities between bootstrapping with linear models and how the estimates might be similar to those obtained from a mixed model. Rogosa, D. R., and Saner, H. M. (1995). Lo

Re: [R] --no-save and --save toggle from inside R? + BATCH stderr

2006-07-11 Thread Duncan Murdoch
ivo welch wrote: > the following diff to the shell script invoking R prints an error > message if R terminates with an error code: > > 112c112,119 > < exec sh "${R_HOME}/bin/Rcmd" "[EMAIL PROTECTED]" ;; > --- > >> sh "${R_HOME}/bin/Rcmd" "[EMAIL PROTECTED]" >> rc="$?" >>

Re: [R] --no-save and --save toggle from inside R? + BATCH stderr

2006-07-11 Thread ivo welch
the following diff to the shell script invoking R prints an error message if R terminates with an error code: 112c112,119 < exec sh "${R_HOME}/bin/Rcmd" "[EMAIL PROTECTED]" ;; --- > sh "${R_HOME}/bin/Rcmd" "[EMAIL PROTECTED]" > rc="$?" > if [ "$rc" -ne 0 ]; then >

[R] help

2006-07-11 Thread Carlos Mauricio Cardeal Mendes
Please, is there any R-list about survival package ? Thanks Mauricio __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Two Phase Sampling

2006-07-11 Thread Mark Hempelmann
Dear WizaRds, I tried to construct a two-phase sampling design in Survey just the way I hoped understood in Vienna - I was wrong. I think I am too stupid to create the correct subset for phase 2. Phase1: Sample 1000 parts with 80 defective. Phase2: Sample 100 parts out of these 1000 wit

[R] Starting Rserve in Java using Runtime Failed

2006-07-11 Thread Shing Hing Man
I have tried using the following piece of Java code to start Rserve on my Linux PC without success. try { String command = "R CMD Rserve "; Process p = Runtime.getRuntime().exec(command); returnCode = p.waitFor(); if (returnCode != 0) { errorMessage = "Unexpected return code = " + returnCode; }

Re: [R] Misunderstanding with lines (or elsewhere)

2006-07-11 Thread vincent
Prof Brian Ripley a écrit : > Think about the coordinate system you are using: if you don't set the > margins to zero you will see what it is. > I suggest you supply x and y to image() to set the coordinate system to > what you want it to be. Thank you for your answer. If I have well understood

[R] non positive-definite G matrix in mixed models: bootstrap?

2006-07-11 Thread Bruno L. Giordano
Dear list, In a mixed model I selected I find a non positive definite random effects variance-covariance matrix G, where some parameters are estimated close to zero, and related confidence intervals are incredibly large. Since simplification of the random portion is not an option, for both inte

[R] the problem of install Bugs package in R under linux environment

2006-07-11 Thread Zhijun Liang
Dear All: Do you know how to install Bugs package in R under linux environment ? I try it ,but it failed to work,it seems that Bugs package just available in windows. by the way ,when will the linux version of Bugs package come out ? Thank you in advance. best regards zhijun

Re: [R] --no-save and --save toggle from inside R? + BATCH stderr

2006-07-11 Thread ivo welch
thank you. exactly what I needed. can I add it as a suggestion for the next R version to add an option to quit that prints only one line to stderr (or stdout, but the real one, not the batch output one) that gives a 1-line job summary---"no error" (or nothing), "5 warnings", "5 warnings, fatal er

Re: [R] Other models of GARCH

2006-07-11 Thread Dirk Eddelbuettel
On Tue, Jul 11, 2006 at 07:41:58AM +0100, Sumanta Basak wrote: > Can you please tell me whether "R" can handle other type GARCH models > like, FIGARCH, E-GARCH, JGR-GARCH etc? Any particular help for these > kind of models? Yes R (no need to quote it) can: if you provide a (log-)likelihood funct

Re: [R] new object

2006-07-11 Thread Jacques VESLOT
> names(summary(fit)) [1] "surv" "time" "n.risk" "n.event" "conf.int" "std.err" [7] "lower""upper""strata" "call" > summary(fit)$n.risk [1] 11 10 8 7 5 4 2 12 10 8 6 5 4 3 2 1 --- Jacques VESLO

Re: [R] Misunderstanding with lines (or elsewhere)

2006-07-11 Thread Prof Brian Ripley
Think about the coordinate system you are using: if you don't set the margins to zero you will see what it is. I suggest you supply x and y to image() to set the coordinate system to what you want it to be. On Tue, 11 Jul 2006, [EMAIL PROTECTED] wrote: > Misunderstanding with lines(...) : > ht

[R] Misunderstanding with lines (or elsewhere)

2006-07-11 Thread vincent
Misunderstanding with lines(...) : http://7d4.com/r/ I would like the y coordinate of the horizontal line to be 1/4, and also the line to begin at x=0 and end at y=1. I'm obviously missing something ... so if anybody could help. Many thanks. test = function() { bmp('test.bmp', width=100, heigh

Re: [R] new object

2006-07-11 Thread ronggui
sum.out<-summary(fit) names(sum.out) [1] "surv" "time" "n.risk" "n.event" "conf.int" "std.err" [7] "lower""upper""strata" "call" sum.out$n.risk [1] 11 10 8 7 5 4 2 12 10 8 6 5 4 3 2 1 sum.out$n.event [1] 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 cbind(sum.out$n.risk,su

[R] new object

2006-07-11 Thread Mauricio Cardeal
Hi ! Please, how can I extract n.event and n.risk as a new object from example below ? Thanks in advance. Mauricio require(survival) fit <- survfit(Surv(time, status) ~ x, data=aml) summary(fit) Call: survfit(formula = Surv(time, status) ~ x, data = aml) x=Maintained time n.

[R] Proportional Hazard Function and Competing risks

2006-07-11 Thread Sharon.Mazurel
How can I model coxph() in combination with competing risks i.e. I have two events and for event the object will leave the data set. So : Coxph(Surv(time,event)~) the event is for all my objects 1. How can I model this? Sharon --

Re: [R] Plot Date

2006-07-11 Thread Gabor Grothendieck
Try this. We first generate some test data, then we plot the data without the x axis. We generate a subset of the times consisting of a sequence of every 7 months and create an axis with that. Then we add smaller ticks every month. library(zoo) # test data x <- seq(0, 10*365) z <- zoo(x, as.D

Re: [R] Coxph

2006-07-11 Thread Heinz Tuechler
>From the help page of Surv: "Although unusual, the event indicator can be omitted, in which case all subjects are assumed to have an event." That means, you can use coxph that way, _but_ it depends on your model. Do you really want to model the time on study regardless of the kind of event? Gree

Re: [R] Second Partial Derivatives

2006-07-11 Thread Rau, Roland
Hi, > [mailto:[EMAIL PROTECTED] On Behalf Of Robert Mcfadden > > Does R have any build-in function which allow me to count > second partial > derivatives numerically? library(nlme) ?fdHess I hope this is the direction you wanted to take. Best, Roland -- This mail has been sent thr

[R] Coxph

2006-07-11 Thread Sharon.Mazurel
Dear all, My question is: In the Surv object you have two arguments, "time" and "event". I have two events, namely withdrawn and success. I use no event or status argument in "Surv" because all my objects "die" in my data set. Does coxph function calculate the coefficients correctly when yo

[R] Coxph function

2006-07-11 Thread Sharon.Mazurel
Dear Sir/Madam, My name is Sharon Mazurel and I'm busy with my final thesis about estimating the probability of the success or withdrawal of a merger or acquisition. For my model I also use duration analysis and found after doing some research that the coxph function in R is very

Re: [R] Table of P values for Fisher's exact test

2006-07-11 Thread Jacques VESLOT
apply(yourdata[, c("X2N_CHB","X2N_AA","Counts_CHB","Counts_AA")], 1, function(x) fisher.test(cbind(x[3:4], x[1:2]-x[3:4]))$p.value) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue du Professeur Calmette B.P. 245 59019 Lill

[R] weights in glmrob

2006-07-11 Thread Celso Barros
Dear List members, MY APOLOGIES IF YOU ALREADY RECEIVED THIS. A COLLEAGUE TOLD ME HE COULD NOT OPEN MY PREVIOUS MESSAGE. I am runnning a logistic regression that includes sample weights (expressed by a variable called WEIGHT) using glmob (from robustbase). My model looks like t

[R] Table of P values for Fisher's exact test

2006-07-11 Thread jenny tan
Hi, I have a table of observed counts for various genetic markers. Instead of doing Fisher's exact test for each marker one at a time and recording the P value manually, is there a script to go through the whole list and generate the P value column automatically? An example of my data: Count

[R] Second Partial Derivatives

2006-07-11 Thread Robert Mcfadden
Hello, Does R have any build-in function which allow me to count second partial derivatives numerically? RobertM [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo

[R] Assistance with dll's to use with dyn.load

2006-07-11 Thread christian.ritter
After having browsed the documentation for a while without discovering what I am looking for, maybe one of you would know ... What I want to do: I have two fortran files MC.f and ESCA.f. In MC.f there is a call to a routine called lpost. This routine (lpost) is defined (among other things) in ES

[R] DIfferent lengths

2006-07-11 Thread Celso Barros
Dear List members, I am having a problem importing SPSS files. For some reason I do not understand, the variables in the data set come into R with different lengths, which seems to make regression analysis impossible. The strangest thing is this: it SOMETIMES work. I ran the same