similar to: Looping survdiff

Displaying 20 results from an estimated 5000 matches similar to: "Looping survdiff"

2012 Oct 18
1
looping survdiff?
Hello, I am trying to set up a loop that can run the survdiff function with the ultimate goal to generate a csv file with the p-values reported. However, whenever I try a loop I get an error such as "invalid type (list) for variable 'survival_data_variables[i]". This is a subset of my data: structure(list(time = c(1.51666666666667, 72, 72, 25.7833333333333, 72, 72, 72, 72, 72,
2008 Dec 04
1
Comparing survival curves with "survdiff" "strata" help
ExpeRts, I'm trying to compare three survival curves using the function "survdiff" in the survival package. Following is my code and corresponding error message. > survdiff(Surv(st_months, status) ~ strata(BOR), data=mydata) Error in survdiff(Surv(st_months, status) ~ strata(BOR), data = mydata) : No groups to test When I check the "strata" of the variable. I get .
2012 Oct 19
2
Question about survdiff in for-loop.
Hi everyone!! I have dataset composed of a numbers of survival analyses. ( for batch survival analyses by using for-loop) . Here are code !! ####### dim(svsv) Num_t<-dim(svsv) Num<-Num_t[2] # These are predictors !! names=colnames(svsv) for (i in 1:Num ) { name_tt=names[i] survdiff(Surv(survival.m, survival) ~ names[i], data=svsv) fit.Group<-survfit(Surv(survival.m, survival) ~
2001 Nov 22
1
p-value using survdiff
Dear all, Does anyone knows how I could extract the p-value in: > survdiff(Surv(tempo,status) ~ grupo,data=dados1,rho=1) Call: survdiff(formula = Surv(tempo, status) ~ grupo, data = dados1, rho = 1) N Observed Expected (O-E)^2/E (O-E)^2/V grupo=1 21 5.12 12.00 3.94 14.5 grupo=2 21 14.55 7.68 6.16 14.5 Chisq= 14.5 on 1 degrees of freedom,
2007 Apr 26
2
Extract p-value from survdiff function
Hi list, I want to use the p-value from the survdiff function (package survival) to reuse within a function in a Kaplan-Meier plot. The p-value is somehow not a component of the value list ?! Thanks in advance -- A. Goralczyk G?ttingen, Ger.
2009 Sep 16
2
Teasing out logrank differences *between* groups using survdiff or something else?
R Folk: Please forgive what I'm sure is a fairly na?ve question; I hope it's clear. A colleague and I have been doing a really simple one-off survival analysis, but this is an area with which we are not very familiar, we just happen to have gathered some data that needs this type of analysis. We've done quite a bit of reading, but answers escape us, even though the question below
2010 Jul 07
1
Appropriateness of survdiff {survival} for non-censored data
I read through Harrington and Fleming (1982) but it is beyond my statistical comprehension. I have survival data for insects that have a very finite expiration date. I'm trying to test for differences in survival distributions between different groups. I understand that the medical field is most often dealing with censored data and that survival analysis, at least in the package survival,
2004 Aug 17
1
survdiff
Hello, As I am quitte an ignorant user of R, excuse me for any wrongfull usage of all the terms. My question relates to the statistics behind the survdiff function in the package survival. My textbook knowledge of the logrank test tells me that if I want to compare two survival curves, I have to take the sum of the factors: (O-E)^2/E of both groups, which will give me the Chisq. If I calculate
2005 Nov 23
1
survdiff for Left-truncated and right-censored data
dear all, I would like to know whether survdiff and survReg function in the survival package work for left-truncated and right-censored data. If not, what other functions can i use to make comparison between two survival curves with LTRC data. thanks for any help given sing yee
2007 Jul 24
1
Fit t distribution
Hi all, I am trying to fit t distribution using the function "tFit" in the library(fBasics). I am using the code tFit(datac[[2]]) and it returns the following list. Title: Student-t Parameter Estimation Call: tFit(x = datac[[2]]) Model: Student-t Distribution Estimated Parameter(s): df 78.4428 I just wonder how can I refer to the estimated parameters. I tried
2013 Apr 29
3
Comparing two different 'survival' events for the same subject using survdiff?
I have a dataset which for the sake of simplicity has two endpoints. We would like to test if two different end-points have the same eventual meaning. To try and take an example that people might understand better: Lets assume we had a group of subjects who all received a treatment. The could stop treatment for any reason (side effects, treatment stops working etc). Getting that data is very
2009 Aug 03
1
survdiff for left-truncated data?
Hi Does anyone know if there is a function like survdiff which can also handle left-truncated and right-censored data? When I use it on left-truncated and right-censored data I get an error message saying Right censored data only. Many thanks Rajen [[alternative HTML version deleted]]
2008 Dec 02
1
Left-truncated regression
Hi. I am looking for a function for left-truncated data. I have one data set with 2 variables (Hours~Yrs_Ed). I already left-censored the data at 200 and left-truncated it at the same spot, so that I am able to make 2 estimations (one for censoring and one for truncation). I know how to make the linear regression for the left-censored variable (hours) and how to plot the regression line into the
2005 Jul 07
2
r: LOOPING
hi all i know that one should try and limit the amount of looping in R programs. i have supplied some code below. i am interested in seeing how the code cold be rewritten if we dont use the loops. a brief overview of what is done in the code. ============================================== ============================================== ============================================== 1. the input
2008 Apr 25
3
Use of survreg.distributions
Dear R-user: I am using survreg(Surv()) for fitting a Tobit model of left-censored longitudinal data. For logarithmic transformation of y data, I am trying use survreg.distributions in the following way: tfit=survreg(Surv(y, y>=-5, type="left")~x + cluster(id), dist="gaussian", data=y.data, scale=0, weights=w) my.gaussian<-survreg.distributions$gaussian
2008 Mar 31
2
L-BFGS-B needs finite values of 'fn'
Dear All, I am trying to solve the optimization problem below, but I am always getting the following error: Error in optim(rep(20, nvar), f, gr, method = "L-BFGS-B", lower = rep(0, : L-BFGS-B needs finite values of 'fn' Any ideas? Thanks in advance, Paul ----------------------------------------------- k <- 10000 b <- 0.3 f <- function(x) { n <- length(x)
2011 Jul 19
1
"may be used in an incorrect context"
R CMD check tells me * checking R code for possible problems ... NOTE agexact.fit.rds: ... may be used in an incorrect context: ?optim(init, agfitfn, ...)? Warning: <anonymous>: ... may be used in an incorrect context: ?optim(init, agfitfn, ...)? Can anyone tell me what this message means? My searches haven't turned up anything useful. This is with R 2.7 and 2.9. The message
2008 Mar 03
1
Problem plotting curve on survival curve
Calum had a long question about drawing survival curves after fitting a Weibull model, using pweibull, which I have not reproduced. It is easier to get survival curves using the predict function. Here is a simple example: > library(survival) > tfit <- survreg(Surv(time, status) ~ factor(ph.ecog), data=lung) > table(lung$ph.ecog) 0 1 2 3 <NA> 63 113 50 1
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
2013 Apr 25
1
lsfit: Error in formatting error message
Hi, in R-3.0 I get the following error when calling lsfit with more observations than variables, which seems to come from an error in the formatting of the error message (note that this was not happening in 2.15.3): > nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar), runif(nobs), intercept=FALSE) Error in sprintf(ngettext(nry, "%d response", "%d