similar to: survreg help in R

Displaying 20 results from an estimated 1000 matches similar to: "survreg help in R"

2008 Aug 07
8
Trying to run simple survival program in R but does not work
Hey, I am just starting to learn R now and I typed in this simple survival program: library(survival) t <- c(10,13,18,19,23,30,36,38,54,56,59,75,93,97,104,107,107,107) c <- c(1,0,0,1,0,1,1,0,0,0,1,1,1,1,0,1,0,0) data <- Surv(t,c) km <- survfit(data) summary(km) Call: survfit(formula = data) but everytime I run it I get this error: Error in
2010 Jul 09
4
Mysterious behavior
I had trouble with some tests for the survival suite last night that I cannot explain. Framework: Ubuntu Linux, R2.11. For testing survival I have a separate directory and Makefile. I pull everything into the local .RData, no packages, library, or namespace. (It's easier to add test modifications to a routine in a chain of calls). A test of survreg + psline would fail because
2011 Nov 12
2
dev.new() within a loop
Hello, I have a loop where I iterate performance data files within a folder, parse and plot them in one shot (see below). However, when executing plot_raw which invokes dev.new(..) all windows come out blank whereas if I execute each file outside of a loop then I can see the plots properly. What's wrong here? Thanks in advance, Best regards, Giovanni # given a directory name, it will
2012 Jan 17
2
How to loop on file names
Dear all, I need to do the same procedure on several files. But I don't know how to refer to the file name. Here is an example of what I am trying to do. List of files: file1(A,B,C, D1...Dn), file2(A,B,C,E1,...,En), file3(A,B,C,F1,...,Fn) Procedure I want to apply on each file: dft <- melt(df,id=c('A','B','C')) dft$X <- substr(dft$variable,1,3) dft$Y <-
2009 Jan 10
1
Setting a contingency table
Hi, I want to set a make a contingency table which will look like this.. The problem is that I can't  set the table like the following.                      col1     col2       Total     row1              a         b         n10                      rp1       rp2        100                      cp1       cp2       rtp1   ---------------------------------------------     row2            
2007 Dec 16
4
improving a bar graph
Hello, Below is the code for a basic bar graph. I was seeking advice regarding the following: (a) For each time period there are values from 16 people. How I can change the colour value so that each person has a different colour, which recurs across each of the three graphs/tie epriods? (b) I have seen much more sophisticated examples using lattice (e.g each person has a separate
2017 Sep 14
2
IVUsers pass is fragile. Is this okay? How can it be resolved?
Thank you for your thoughts, Hal. More information below... On Sep 13, 2017, at 5:43 PM, Hal Finkel <hfinkel at anl.gov<mailto:hfinkel at anl.gov>> wrote: On 09/13/2017 01:01 PM, Daniel Neilson via llvm-dev wrote: … snip For example, the following IR will produce different sets of IV users if either: i) The order of the PHI nodes in the %loop block are reordered; or ii) The
2017 Sep 15
2
IVUsers pass is fragile. Is this okay? How can it be resolved?
On Sep 14, 2017, at 9:30 PM, Hal Finkel <hfinkel at anl.gov<mailto:hfinkel at anl.gov>> wrote: On 09/14/2017 10:43 AM, Daniel Neilson wrote: Thank you for your thoughts, Hal. More information below... On Sep 13, 2017, at 5:43 PM, Hal Finkel <hfinkel at anl.gov<mailto:hfinkel at anl.gov>> wrote: On 09/13/2017 01:01 PM, Daniel Neilson via llvm-dev wrote: … snip For
2009 Dec 29
4
subsetting by groups, with conditions
I have a data set similar to this: P1id Veg1 Veg2 AreaPoly2 P2ID 1 p p 1 1 1 p p 1.5 2 2 p p 2 3 2 p h 3.5 4 For each group of "Poly1id" records, I wish to output (subset) the record which has largest "AreaPoly2" value, but only if
2017 Sep 16
0
IVUsers pass is fragile. Is this okay? How can it be resolved?
On 09/14/2017 10:31 PM, Daniel Neilson wrote: > > >> On Sep 14, 2017, at 9:30 PM, Hal Finkel <hfinkel at anl.gov >> <mailto:hfinkel at anl.gov>> wrote: >> >> >> On 09/14/2017 10:43 AM, Daniel Neilson wrote: >>> Thank you for your thoughts, Hal. More information below... >>> >>>> On Sep 13, 2017, at 5:43 PM, Hal Finkel
2017 Sep 13
2
IVUsers pass is fragile. Is this okay? How can it be resolved?
Hi all, I’ve most recently been grappling with a difficult to reproduce bug. I’ve traced the source of the difficulty in reproduction to the IVUsers analysis pass that is used by Loop Strength Reduction. Specifically, the IVUsers pass’s output is very sensitive to both the use list ordering of the instructions that it is looking at and the ordering of the Phi nodes in the header block of the loop
2009 Apr 18
5
Dummy (factor) based on a pair of variables
Dear All! my data is on pairs of countries, i and j, e.g.: y,i,j 1,AUT,BEL 2,AUT,GER 3,BEL,GER I would like to create a dummy (indicator) variable for use in regression (using factor?), such that it takes the value of 1 if the country is in the pair (i.e. EITHER an i-country OR an j-country). Thank you for your help, Serguei ________________________________________ Austrian Institute of
2009 Jan 20
1
generalizing expand.table: table -> data.frame
In http://tolstoy.newcastle.edu.au/R/e2/help/06/10/3064.html a method was given for converting a frequency table to an expanded data frame representing each observation as a set of factors. A slightly modified version was later included in the NCStats package, only on http://rforge.net/ (and it has too many dependencies to be useful). I've tried to make it more general, allowing an input
2003 Mar 11
3
fft help
Hi R-users: I want to know if there is an easy way to obtain a Fourier Transform form a vector or an array (just like fft does), but with a more density base. I mean, if I have a vector of 512 of length, I want the Fourier Transform to be 1024, or 2048, etc, in length (de u domain). Or should I modify the fft C code to do that? If I want to modify the precision of the fft function, which
2005 May 03
2
comparing lm(), survreg( ... , dist="gaussian") and survreg( ... , dist="lognormal")
Dear R-Helpers: I have tried everything I can think of and hope not to appear too foolish when my error is pointed out to me. I have some real data (18 points) that look linear on a log-log plot so I used them for a comparison of lm() and survreg. There are no suspensions. survreg.df <- data.frame(Cycles=c(2009000, 577000, 145000, 376000, 37000, 979000, 17420000, 71065000, 46397000,
2005 Jun 09
2
Weibull survival modeling with covariate
I was wondering if someone familiar with survival analysis can help me with the following. I would like to fit a Weibull curve, that may be dependent on a covariate, my dataframe "labdata" that has the fields "cov", "time", and "censor". Do I do the following? wieb<-survreg(Surv(labdata$time, labadata$censor)~labdata$cov,
2012 Nov 15
2
survreg & gompertz
Hi all, Sorry if this has been answered already, but I couldn't find it in the archives or general internet. Is it possible to implement the gompertz distribution as survreg.distribution to use with survreg of the survival library? I haven't found anything and recent attempts from my side weren't succefull so far. I know that other packages like 'eha' and
2011 May 14
2
Survreg object
Hi,Just a quick one, does anyone know the command for accessing the standard errors from a survreg object? I can access the coefficients by model$coefficients, but I cant seem to find a command to access the errors. Any help would be greatly appreciated.Regards,Andre [[alternative HTML version deleted]]
2010 Nov 25
2
aftreg vs survreg loglogistic aft model (different intercept term)
Hi, I'm estimating a loglogistic aft (accelerated failure time) model, just a simple plain vanilla one (without time dependent covariates), I'm comparing the results that I obtain between aftreg (eha package) and survreg(surv package). If I don't use any covariate the results are identical , if I add covariates all the coefficients are the same until a precision of 10^4 or 10^-5 except
2005 Apr 26
1
survreg with numerical covariates
Does anyone know if the survreg function in the survival package can fit numerical covariates ? When I fit a survival model of the form survreg( Surv(time,censored) ~ x ) then x is always treated as a factor even if it is numeric (and even if I try to force it to be numeric using as.numeric(x). Thus, in the particular example I am analysing, a simple numerical covariate becomes a factor