[R] REPOST: Need help interpreting output from rcorrp.cens with Cox regression

2012-08-17 Thread Peter Jepsen
more concordant' numbers in a Cox regression setting? My guess: My comorbidity score concordant in 4.6% of pairs in which Charlson's score is not. And Charlson's score is concordant in 4.0% of pairs in which my comorbidity score is not. Thank you in advance for your insi

[R] Need help interpreting output from rcorrp.cens with Cox regression

2012-04-08 Thread Peter Jepsen
evant Pairs "1.587e+08" Uncertain "2.861e+07" C X1 "0.395" C X2 "0.401" Dxy X1 "-0.21" Dxy X2 "-0.198" Question: How do I interpret the 'x1/x2 more concordant'

Re: [R] survival probability estimate method

2011-08-04 Thread Peter Jepsen
Dear John I am not aware of an R package that does this, but I believe that Patrick Royston's -stpm- function for Stata does. Here's two references found in http://www.stata-journal.com/sjpdf.html?articlenum=st0001_2: Royston, P. 2001. Flexible parametric alternatives to the Cox model. Stata J

[R] Figures within tables [slightly off-topic]

2010-04-12 Thread Peter Jepsen
Dear R-listers I am writing a manuscript for a scientific journal in clinical medicine. I have three groups of patients, and I present a 10*3 table of their characteristics in Table 1. Some of their characteristics, e.g. their age, are on a continuous scale, others are dichotomous. I am thinkin

[R] Competing risks regression

2009-11-17 Thread Peter Jepsen
Dear listers, With the current version of the 'cmprsk' package it is not possible to include (non-continuously) time-dependent covariates in a Fine + Gray competing risks regression model. Is anyone aware of a workaround, or could an updated cmprsk package be underway? My current workaround is

[R] Find boundaries between two SpatialPolygonsDataFrame objects?

2009-03-28 Thread Peter Jepsen
Dear R-helpers I have two SpatialPolygonsDataFrame objects, but I want to plot only the boundary between them. The boundary object is to be overlaid I plot that I have made, so I would strongly prefer a method that does not rely on grid graphics. Thank you in advance for any pointers. Kind regar

[R] stopping stepAIC (MASS package)

2009-02-17 Thread Peter Jepsen
dure would stop automatically when it encounters any anomaly that causes it to warn me. Is this possible? And if so, how? Thank you in advance for any assistance. Peter Jepsen, MD > sessionInfo() R version 2.8.1 (2008-12-22) i386-pc-mingw32 locale: LC_COLLATE=Danish_Denmark.1252;LC_CTYPE=D

[R] Introduction to maps (of Denmark)?

2009-02-06 Thread Peter Jepsen
Dear R-listers, I am using R for Windows Vista 64-bit. I have no experience working with maps, but now I have to plot a map of Denmark in which each Danish county is color-coded according to its incidence rate of a particular disease. My problem is that I don't know where to start. I have read the

[R] Assigning colnames in loop

2009-02-02 Thread Peter Jepsen
Dear R-listers, I am trying to assign colnames to a data frame within a loop, but I keep getting a "target of assignment expands to non-language object"-error. I need to split up a large dataset into about 20 smaller ones, and I would like to assign colnames within the loop, so I won't have to typ

Re: [R] Sweave'ing Danish characters

2009-01-27 Thread Peter Jepsen
Thank you, Duncan! It works perfectly! Best regards, Peter. -Original Message- From: Duncan Murdoch [mailto:murd...@stats.uwo.ca] Sent: 27. januar 2009 13:04 To: Peter Jepsen Cc: r-help@r-project.org Subject: Re: [R] Sweave'ing Danish characters On 26/01/2009 5:44 PM, Peter J

[R] Sweave'ing Danish characters

2009-01-26 Thread Peter Jepsen
Hi, I am writing an Sweave document and am using 'xtable' to make frequency tables of diagnoses of people undergoing cholecystectomy. Some of these diagnoses contain Danish characters ("æ", "ø", and "å"), and these characters are all garbled in the Latex document after I run Sweave. The odd thi

Re: [R] Data manipulation question

2008-11-06 Thread Peter Jepsen
e will do the trick. I would like to add that using data is a somewhat bad behavior, as this overwrites the build in data function of R. And I changed the way you made up the data.frame, as your method would convert everything to factors. Good luck Bart Peter Jepsen wrote: > > Dear R-

[R] Data manipulation question

2008-11-06 Thread Peter Jepsen
12 # This patient was transferred at time 6 and discharged at time 12. The admission starting at time 17 is therefore irrelevant. b 0 10 c 0 3 d 0 6 I have tried tons of variations over lapply, sapply, split, for etc., all to no avai

[R] Sweave, xtable and font size

2008-05-07 Thread Peter Jepsen
Hi, I'm using Sweave with xtable to generate Latex tables. My problem is that some of the tables are too wide, and I would like to use the tiny font for these tables, but not for the others nor for the text. I can't work out how to accomplish that. The Latex code below does what I want it to,

Re: [R] sqldf file specification, non-ASCII

2008-04-03 Thread Peter Jepsen
perfect tool for this job, but it doesn't seem to be available for Windows. Is anybody out there aware of a similar Windows tool? Thank you again for your help. Peter. -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: 3. april 2008 17:08 To: Peter Jepsen Subjec

[R] sqldf file specification, non-ASCII

2008-04-03 Thread Peter Jepsen
Dear R-Listers, I am a Windows user (R 2.6.2) using the development version of sqldf to try to read a 3GB file originally stored in .sas7bdat-format. I convert it to comma-delimited ASCII format with StatTransfer before trying to import just the rows I need into R. The problem is that I get this e

Re: [R] Quick question: Does this graph have a name?

2008-03-28 Thread Peter Jepsen
Hi, I think it looks like a spineplot. Best regards, Peter. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of mika03 Sent: 28. marts 2008 13:37 To: r-help@r-project.org Subject: [R] Quick question: Does this graph have a name? http://www.nabble.com/file/

Re: [R] Direct adjusted survival?

2008-01-31 Thread Peter Jepsen
s. Best regards, Peter. -Oprindelig meddelelse- Fra: Terry Therneau [mailto:[EMAIL PROTECTED] Sendt: 31. januar 2008 15:52 Til: Peter Jepsen Cc: r-help@r-project.org Emne: Re: Direct adjusted survival? > The lines that I hoped to be the survival probabilities for each edtrt-group >

Re: [R] Direct adjusted survival?

2008-01-30 Thread Peter Jepsen
(cfit, se.fit = F) # Changed from "survfit.coxph" to "survfit" fits <- outer(bfit$surv,explp.off,function(x,y) x^y) avg.fits <- apply(sweep(fits,2,weights,"*"),c(1,3),sum)/sum(weights) dimnames(avg.fits) <- list(NULL,

[R] Direct adjusted survival?

2008-01-29 Thread Peter Jepsen
Hello, I am trying to find an R function to compute 'direct adjusted survival' with standard errors. A SAS-macro to do this is presented in Zhang X, Loberiza FR, Klein JP, Zhang MJ. A SAS macro for estimation of direct adjusted survival curves based on a stratified Cox regression model. Comput

Re: [R] [OT] vernacular names for circular diagrams

2008-01-28 Thread Peter Jepsen
If anyone is interested in seeing "Nightingale's Coxcomb" a.k.a. "Nightingale's Rose", it can be seen at http://www.economist.com/world/europe/displaystory.cfm?story_id=10278643. Best regards, Peter. -Oprindelig meddelelse- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af R

Re: [R] Markov models

2007-10-29 Thread Peter Jepsen
David, You should probably have a look at the 'msm' package. Best, Peter. -Oprindelig meddelelse- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af Doran, Harold Sendt: 29. oktober 2007 13:46 Til: David Kaplan; [EMAIL PROTECTED] Emne: Re: [R] Markov models David I think tran