Re: [R] Relsurv package

2010-11-02 Thread David Winsemius


On Nov 2, 2010, at 12:29 PM, Laurence Lauvier wrote:



Hello,
I have a question about relsurv package particularly rsadd function:
Rsadd(Surv(time,cens)~sex 
+ 
ratetable 
(age 
= 
age 
*365.24,sex=sex,year=year),data=,=ratetable=,int=5,method=”max.lik”).
In the tutorial, it is indicated that the age and year must be  
given in the
date format, i.e. in number of days since 01.01.1960.  
Nethertheless, in

Pohar’s article,
http://ibmi.mf.uni-lj.si/ibmi/biostat-center/predtiski/CMPB_Pohar_Stare_relsurv.pdf 
,

there is no indication about that. What is the true way to use this
function.
Thanks for your help,


I seem to remember an almost identical question on rhelp from some  
months ago. (I remember because I looked at the article and the  
package documentation at the time.) Have you contacted the authors at  
any point?


--
David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] relsurv package

2010-10-29 Thread Laurence Lauvier

Hello,
I have a question about relsurv package particularly rsadd function:
Rsadd(Surv(time,cens)~sex+ratetable(age=age*365.24,sex=sex,year=year),data=,=ratetable=,int=5,method=”max.lik”).
In the tutorial, it is indicated that the age and year must be given in the
date format, i.e. in number of days since 01.01.1960. Nethertheless, in
Pohar’s article,
http://ibmi.mf.uni-lj.si/ibmi/biostat-center/predtiski/CMPB_Pohar_Stare_relsurv.pdf,
there is no indication about that. What is the true way to use this
function.
Thanks for your help,

Laurence

-- 
View this message in context: 
http://r.789695.n4.nabble.com/Re-relsurv-package-tp867129p3019040.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] relsurv package

2008-09-11 Thread Giulia Barbati
Thank you.

But the problem with the relsurv package remains: when I try to use the 
function rsmul following the package example, it give me an error (Error in 
nrow(x) : object x not found).
There are perhaps others packages to fit relative survival models ?

Giulia



- Original Message 
From: Prof Brian Ripley [EMAIL PROTECTED]
To: Yihui Xie [EMAIL PROTECTED]
Cc: Giulia Barbati [EMAIL PROTECTED]; r-help@r-project.org
Sent: Wednesday, September 10, 2008 11:44:43 AM
Subject: Re: [R] relsurv package

On Wed, 10 Sep 2008, Yihui Xie wrote:

 For the second question, try something like:

 strptime('12/4/1996','%M/%d/%Y')
 [1] 1996-09-04 00:12:00
 # only date?
 as.Date(strptime('12/4/1996','%M/%d/%Y'))
 [1] 1996-09-04

Why not

 as.Date('12/4/1996', format = '%m/%d/%Y')
[1] 1996-12-04

? (And note the typo in your solution and hence incorrect answer.)


 Yihui

 On Wed, Sep 10, 2008 at 4:22 PM, Giulia Barbati [EMAIL PROTECTED] wrote:

 Dear R-users,

 I have a couple of questions about the relsurv package:

 1) when I try to run the example:

 fit - 
 rsmul(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365.24,sex=sex,year=year),ratetable=slopop,data=rdata)

 with the datasets in the package (rdata and slopop) it gives me an error:

 Error in nrow(x) : object x not found

 2)
 If I have a date format like:6/17/1997  9/10/1990  12/4/1996  how
 to convert it in the Rdate format required by ratetable?

 Thank you very much for help,

 Giulia




 -- 
 Yihui Xie [EMAIL PROTECTED]
 Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
 Mobile: +86-15810805877
 Homepage: http://www.yihui.name
 School of Statistics, Room 1037, Mingde Main Building,
 Renmin University of China, Beijing, 100872, China

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] relsurv package

2008-09-11 Thread Prof Brian Ripley

On Thu, 11 Sep 2008, Giulia Barbati wrote:


Thank you.

But the problem with the relsurv package remains: when I try to use the
function rsmul following the package example, it give me an error
(Error in nrow(x) : object x not found).


What did the maintainer say when you asked (see the posting guide)?

You didn't give a reproducible example: here is my attempt to make 
yours reproducible in a legible way):


library(relsurv)
data(rdata); data(slopop)
fit -rsmul(Surv(time,cens) ~ sex + as.factor(agegr) +
ratetable(age=age*365.24,sex=sex,year=year),
ratetable = slopop, data = rdata)

And that works in


sessionInfo()

R version 2.7.2 (2008-08-25)
x86_64-unknown-linux-gnu

locale:
LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] splines   stats graphics  grDevices utils datasets  methods
[8] base

other attached packages:
[1] relsurv_1.4 survival_2.34-1

loaded via a namespace (and not attached):
[1] tools_2.7.2

So, please do follow the posting guide: it looks like the problem is local 
to you.




There are perhaps others packages to fit relative survival models ?

Giulia

- Original Message 
From: Prof Brian Ripley [EMAIL PROTECTED]
To: Yihui Xie [EMAIL PROTECTED]
Cc: Giulia Barbati [EMAIL PROTECTED]; r-help@r-project.org
Sent: Wednesday, September 10, 2008 11:44:43 AM
Subject: Re: [R] relsurv package

On Wed, 10 Sep 2008, Yihui Xie wrote:

 For the second question, try something like:

 strptime('12/4/1996','%M/%d/%Y')
 [1] 1996-09-04 00:12:00
 # only date?
 as.Date(strptime('12/4/1996','%M/%d/%Y'))
 [1] 1996-09-04

Why not

 as.Date('12/4/1996', format = '%m/%d/%Y')
[1] 1996-12-04

? (And note the typo in your solution and hence incorrect answer.)


 Yihui

 On Wed, Sep 10, 2008 at 4:22 PM, Giulia Barbati [EMAIL PROTECTED]
wrote:

 Dear R-users,

 I have a couple of questions about the relsurv package:

 1) when I try to run the example:

 fit 
-rsmul(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365.24,sex=sex,year
=year),ratetable=slopop,data=rdata)

 with the datasets in the package (rdata and slopop) it gives me an
error:

 Error in nrow(x) : object x not found

 2)
 If I have a date format like:6/17/1997  9/10/1990  12/4/1996 
how
 to convert it in the Rdate format required by ratetable?

 Thank you very much for help,

 Giulia




 --
 Yihui Xie [EMAIL PROTECTED]
 Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
 Mobile: +86-15810805877
 Homepage: http://www.yihui.name
 School of Statistics, Room 1037, Mingde Main Building,
 Renmin University of China, Beijing, 100872, China

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


--
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,            Tel:  +44 1865 272861 (self)
1 South Parks Road,                    +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595





--
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] relsurv package

2008-09-10 Thread Giulia Barbati

Dear R-users,

I have a couple of questions about the relsurv package: 

1) when I try to run the example: 

fit - 
rsmul(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365.24,sex=sex,year=year),ratetable=slopop,data=rdata)

with the datasets in the package (rdata and slopop) it gives me an error:

Error in nrow(x) : object x not found

2)
If I have a date format like:6/17/1997  9/10/1990  12/4/1996  how
to convert it in the Rdate format required by ratetable?

Thank you very much for help,

Giulia



- Original Message 
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 10, 2008 9:39:47 AM
Subject: relsurv package

Message rejected by filter rule match


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] relsurv package

2008-09-10 Thread Yihui Xie
For the second question, try something like:

 strptime('12/4/1996','%M/%d/%Y')
[1] 1996-09-04 00:12:00
# only date?
 as.Date(strptime('12/4/1996','%M/%d/%Y'))
[1] 1996-09-04

Yihui

On Wed, Sep 10, 2008 at 4:22 PM, Giulia Barbati [EMAIL PROTECTED] wrote:

 Dear R-users,

 I have a couple of questions about the relsurv package:

 1) when I try to run the example:

 fit - 
 rsmul(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365.24,sex=sex,year=year),ratetable=slopop,data=rdata)

 with the datasets in the package (rdata and slopop) it gives me an error:

 Error in nrow(x) : object x not found

 2)
 If I have a date format like:6/17/1997  9/10/1990  12/4/1996  how
 to convert it in the Rdate format required by ratetable?

 Thank you very much for help,

 Giulia




-- 
Yihui Xie [EMAIL PROTECTED]
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] relsurv package

2008-09-10 Thread Prof Brian Ripley

On Wed, 10 Sep 2008, Yihui Xie wrote:


For the second question, try something like:


strptime('12/4/1996','%M/%d/%Y')

[1] 1996-09-04 00:12:00
# only date?

as.Date(strptime('12/4/1996','%M/%d/%Y'))

[1] 1996-09-04


Why not


as.Date('12/4/1996', format = '%m/%d/%Y')

[1] 1996-12-04

? (And note the typo in your solution and hence incorrect answer.)



Yihui

On Wed, Sep 10, 2008 at 4:22 PM, Giulia Barbati [EMAIL PROTECTED] wrote:


Dear R-users,

I have a couple of questions about the relsurv package:

1) when I try to run the example:

fit - 
rsmul(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365.24,sex=sex,year=year),ratetable=slopop,data=rdata)

with the datasets in the package (rdata and slopop) it gives me an error:

Error in nrow(x) : object x not found

2)
If I have a date format like:6/17/1997  9/10/1990  12/4/1996  how
to convert it in the Rdate format required by ratetable?

Thank you very much for help,

Giulia





--
Yihui Xie [EMAIL PROTECTED]
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.