Displaying 17 results from an estimated 17 matches similar to: "creating a new column"
2007 May 01
1
adding column to a matrix
l have the following dataset and would like to calculate the actual survival time by
if censoring time > survival time then actual survival time =survival time else its= censoring time.
treatmentgrp strata censoringTime survivalTime censoring actualsurvivaltim
[1,] 1 1 1.012159 1137.80922 0
[2,] 2 2
2007 Apr 26
3
adding a column to a matrix
i would like to add a variable to an existing matrix by manipulating 2 previous variables eg for the data
m
treat strata censti survTime
[1,] 1 2 284.684074 690.4961005
[2,] 1 1 172.764515 32.3990335
[3,] 1 1 2393.195400 24.6145279
[4,] 2 1 30.364771 8.0272267
[5,] 1 1 523.182282 554.7659501
l
2007 May 07
2
computing logrank statistic/test
hie how do you compute the logrank test using R
what commands do you use my data looks something like just an example
treatmentgrp strata censoringTime survivalTime censoring act.surv.time
[1,] 2 2 42.89005 1847.3358 1 42.89005
[2,] 1 1 74.40379 440.3467 1 74.40379
[3,] 2 2
2007 May 17
2
controling the size of vectors in a matrix
hie R users
l have the following matrix
n=20
m<-matrix(nrow=n,ncol=4)
colnames(m)=c("treatmentgrp","strata","survivalTime")
for(i in 1:n) m[i,]<-c(sample(c(1,2),1,replace=TRUE),sample(c(1:2),1,replace=TRUE),rexp(1,0.07),rexp(1,0.02))
2007 May 17
1
creating columns
l would like to create the following matrice
treatmentgrp strata
1 1 1 1 1 1 1 2 1 2 1 2 2 1 2 1 2 1 2 2 2 2 2 2 l should be able to choose the size of the treatment grps and stratas the method l used intially creates the
2007 May 10
0
getting the normal dist from the chisqr with 1df
l used the following code to generate a sample and then calculated then did a log rank test.can l get the normal version of the logrank eg sqrt of the chisqr(1) will give you the N~(0,1).
from my sample can i use the above expression to get the normal dist from the result of the log rank test.
thank
s=1
while(s!=0){ n=100
m<-matrix(nrow=n,ncol=4)
2012 May 11
2
survival analysis simulation question
Hi,
I am trying to simulate a regression on survival data under a few
conditions:
1. Under different error distributions
2. Have the error term be dependent on the covariates
But I'm not sure how to specify either conditions. I am using the Design
package to perform the survival analysis using the survreg, bj, coxph
functions. Any help is greatly appreciated.
This is what I have so far:
2007 Feb 21
2
Coxph and ordered factors
Dear useRs,
I am trying to fit a Cox PH model on survival data from a lung cancer
dataset. I would like to include the patient staging (I-IV) as a
covariate. For this I use the following function:
coxph(Surv(time,status) ~ stage)
The staging information is a categorical variable, and it is important
to take the ordering into account (I<II<III<IV). Does the coxph function
handle
2020 Sep 29
5
2 KM curves on the same plot
Hello,
Can anyone suggest a simple way to generate a Kaplan-Meier plot with 2 survfit objects, just like this one:?
https://drive.google.com/file/d/1fEcpdIdE2xYtA6LBQN9ck3JkL6-goabX/view?usp=sharing
Suppose I have 2 survfit objects: fit1 is for the curve on the left (survtime has been truncated to the cutoff line: year 5), fit2 is for the curve on the right (minimum survival time is at the
2010 Nov 24
2
Is there an equivalent to predict(..., type="linear") of a Proportional hazard model for a Cox model instead?
Hi all,
Is there an equivalent to predict(...,type="linear") of a Proportional hazard
model for a Cox model instead?
For example, the Figure 13.12 in MASS (p384) is produced by:
(aids.ps <- survreg(Surv(survtime + 0.9, status) ~ state + T.categ +
pspline(age, df=6), data = Aidsp))
zz <- predict(aids.ps, data.frame(state = factor(rep("NSW", 83), levels =
2007 May 03
0
unscrible pls
On 5/2/07, r-help-request@stat.math.ethz.ch <
r-help-request@stat.math.ethz.ch> wrote:
>
> Send R-help mailing list submissions to
> r-help@stat.math.ethz.ch
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://stat.ethz.ch/mailman/listinfo/r-help
> or, via email, send a message with subject or body 'help' to
>
2004 Nov 02
3
time dependency of Cox regression
Hi,
How can I specify a Cox proportional hazards model
with a covariate which i believe its strength on
survival changes/diminishes with time? The value of
the covariate was only recorded once at the beginning
of the study for each individual (e.g. at the
diagnosis of the disease), so I do not have the time
course data of the covariate for any given individual.
For example, I want to state at the
2007 Apr 25
0
Use of Lexis function to convert survival data to counting format
I'm trying to convert a dataset from the time-independent analysis form
> head(addicts)
id clinic status survtime prison meth clinic01
1 1 1 1 428 0 50 1
2 2 1 1 275 1 55 1
3 3 1 1 262 0 55 1
into the "counting data format" necessary to perform extended Cox regression.
I got
2003 Mar 12
1
simulating 'non-standard' survival data
Dear all,
I'm looking for someone that help me to write an R function to simulate
survival data under complex situations, namely time-varying hazard ratio,
marginal distribution of survival times and covariates. The algorithm is
described in the reference below and it should be not very difficult to
implement it. However I tried but without success....;-(
Below there the code that I used; it
2010 Dec 05
0
Help with time varying covariate-unfold function
Hello All,
I am trying to use the unfold function in RcmdrPlugin.survival library,
which converts the survival data with time varying covariates to the
counting process notation. The problem is somehow, the event indicator
created is not correct.
Below is the data, I am trying to convert:
CASE TRT FAILTIME FAILCENS SEX AGE IGG0 IGG28 IGG42 IGG84 IGG364
26003 A 11.2033
2011 Jul 21
0
Survdiff for multiple comparisons
Hello all-
I am doing a survival analysis for two species of invasive plants I
outplanted to edges and interiors of island and mainland sites in a local
reservoir. I am using the KM estimate and had no problem doing survdiff for
my data using the following code:
S4<-Surv(outplant$SurvTime, outplant$StatusD6)
diff4=survdiff(S4 ~ outplant$Species+outplant$SiteType+outplant$EdgInt)
diff4
2020 Sep 30
0
2 KM curves on the same plot
Hi John,
Brilliant solution and the best sort - when you finally solve your
problem by yourself.
Jim
On Thu, Oct 1, 2020 at 2:52 AM array chip <arrayprofile at yahoo.com> wrote:
>
> Hi Jim,
>
> I found out why clip() does not work with lines(survfit.object)!
>
> If you look at code of function survival:::lines.survfit, in th middle of the code:
>
> do.clip <-