search for: cens

Displaying 20 results from an estimated 219 matches for "cens".

Did you mean: cdns
2010 Jan 04
1
no "rcorrp.cens" in hmisc package
Dear, I wanna to compare AUC generated by two distribution models using the same sample. I tried improveProb function's example code below. set.seed(1) library(survival) x1 <- rnorm(400) x2 <- x1 + rnorm(400) d.time <- rexp(400) + (x1 - min(x1)) cens <- runif(400,.5,2) death <- d.time <= cens d.time <- pmin(d.time, cens) rcorrp.cens(x1, x2, Surv(d.time, death)) #rcorrp.cens(x1, x2, y) ## no censoring set.seed(1) x1 <- runif(1000) x2 <- runif(1000) y <- sample(0:1, 1000, TRUE) rcorrp.cens(x1, x2, y) improveProb(x1, x2, y)...
2012 Apr 16
1
R: Help; error in optim
Hello, When i run the code below from Weibull distribution with 30% censoring by using optim i get an error form R, which states that Error in optim(start, fn = z, data = q, hessian = T) :? ? objective function in optim evaluates to length 25 not 1 can somebody?help me remove this error. Is my censoring approach correct. n=25;rr=1000 p=1.5;b=1.2 for (i in 1:rr){ q&l...
2009 Sep 08
1
rcorrp.cens and U statistics
I have two alternative Cox models with C-statistics 0.72 and 0.78. My question is if 0.78 is significantly greater than 0.72. I'm using rcorrp.cens. I cannot find the U statistics in the output of the function. This is the output of the help example: > x1 <- rnorm(400) > x2 <- x1 + rnorm(400) > d.time <- rexp(400) + (x1 - min(x1)) > cens <- runif(400,.5,2) > death <- d.time <= cens > d.time <- pmin(d....
2011 May 22
1
How to calculate confidence interval of C statistic by rcorr.cens
Hi, I'm trying to calculate 95% confidence interval of C statistic of logistic regression model using rcorr.cens in rms package. I wrote a brief function for this purpose as the followings; CstatisticCI <- function(x) # x is object of rcorr.cens. { se <- x["S.D."]/sqrt(x["n"]) Low95 <- x["C Index"] - 1.96*se Upper95 <- x["C Index"] + 1.96*se...
2004 Sep 05
1
Question to NLME, ML vs. REML
Dear all, I am planning to use nlme library for analysis of experiments in semiconductor industry. Currently I am using "lm" but plan to move to "lme" to handle within wafer / wafer-to-wafer and lot-to-lot variation correctly. So far everything is working well, but I have a fundamentel question: NLME offers "maximum likelihood" and "restricted maximum
2009 Sep 04
1
Problem with locfit( ... , family="hazard")
...m having difficulties with plot.locfit.3d, at least I think that is the problem. I have a large dataframe (about 4 MM cases) and was hoping to see a non-parametric estimate of the hazard plotted against two variables: > fit <- locfit(~surv.yr+ ur_protein + ur_creatinine, data=TRdta, cens = 1-death, family = "hazard", xlim=c(0,10)) # it took somewhere between 1 and 2 hours to complete, but it did complete and reported no errors or warnings. > plot(fit, pv=c("ur_protein", "ur_creatinine")) Error in if (from == to) rep.int(from, length.out) else...
2004 Mar 21
1
Multilevel analysis with package lme
Dear list, i am a student of psychology and have to do a multilevelanalysis on some data. About that i have one general and one specific question. This is what i have copied from the help-file on lme: data(bdf) fm <- lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf, random = ~ IQ.ver.cen | schoolNR) summary(fm) after summary(fm) i get the following error:
2006 Apr 21
1
rcorrp.cens
...e drop in concordance index due to omitting one covariate is significant. I think (but I'm not sure) here are two ways to do that: 1) predict two cox model (the full model and model without the covariate of interest) and estimate the concordance index (i.e. area under the ROC curve) with rcorr.cens for both models, then compute the difference 2) predict the two cox models and estimate directly the difference between the two c-indices using rcorrp.cens. But it seems that the rcorrp.cens gives me the drop of Dxy index. Do you have any hint? Thanks Stefano [[alternative HTML version deleted...
2005 Oct 05
1
how do I write Rd file for this?
Dear R-devel, I'm working on Prof. Loader's new version of locfit to try to get it pass R CMD check. I'm almost there, but I have a problem with some Rd files that I hope some one can help me resolve. Here's an example: In the package there's a function called locfit.censor(). This function can be used in a few different ways: locfit.censor(x, y, cens, ...) locfit.censor(formula, ...) locfit(formula, ..., lfproc=locfit.censor) What I did in locfit.censor.Rd is have something like: \synopsis{ locfit.censor(x, y, cens, ..., iter=3, km=FALSE) } \usage{ locfit(form...
2008 Dec 09
2
Need help optimizing/vectorizing nested loops
Hi, I'm analyzing a large number of large simulation datasets, and I've isolated one of the bottlenecks. Any help in speeding it up would be appreciated. `dat` is a dataframe of samples from a regular grid. The first two columns are the spatial coordinates of the samples, the remaining 20 columns are the abundances of species in each cell. I need to calculate the species richness in
2011 Mar 01
1
which does the "S.D." returned by {Hmisc} rcorr.cens measure?
Dear R-help, This is an example in the {Hmisc} manual under rcorr.cens function: > set.seed(1) > x <- round(rnorm(200)) > y <- rnorm(200) > round(rcorr.cens(x, y, outx=F),4) C Index Dxy S.D. n missing uncensored Relevant Pairs Concordant Uncertain 0.4831 -0.0338 0.0...
2009 Mar 09
1
rcorr.cens Goodman-Kruskal gamma
...et ordinal scale; ranked) for each plant species and relev?. I found a lot of r-packages dealing with cluster analysis, but none of them is able to calculate a distance measure for ranked data. Podani recommends the use of Goodman and Kruskals' Gamma for the distance. I found the function rcorr.cens (outx=true) of the Hmisc package which should do it. What I don't understand is how to define the input vectors x, y with my vegetation dataset. The other thing how I can use the output of rcorr.cens for a distance measure in the cluster analysis (e.g. in vegan or amap). Any help would be great...
2012 Aug 31
3
fitting lognormal censored data
Hi , I am trying to get some estimator based on lognormal distribution when we have left,interval, and right censored data. Since, there is now avalible pakage in R can help me in this, I had to write my own code using Newton Raphson method which requires first and second derivative of log likelihood but my problem after runing the code is the estimators were too high. with this email ,I provide simple example...
2004 Jun 07
1
Censboot Warning and Error Messages
Good day R help list!!! I've been trying to do Bootstrap in R on Censored data. I encountered WARNING/ERROR messages which I could not find explanation. I've been searching on the literature for two days now and still can't find answers. I hope there's anyone out there who can help me with these two questions: 1. If the "Loglik converged before...
2006 Jun 14
3
A question about stepwise procedures: step function
Dear all, I tried to use "step" function to do model selection, but I got an error massage. What I don't understand is that data as data.frame worked well for my other programs, how come I cannot make it run this time. Could you please tell me how I can fix it? ***************************************************************************************************
2012 Nov 07
2
R: net reclassification index after Cox survival analysis
...sted to evaluate reclassification using net reclassification improvement and Integrated Discrimination Index IDI after survival analysis (Cox proportional hazards using stcox). I search a R package or a R code that specifically addresses the categorical NRI for time-to-event data in the presence of censored observation and, if possible, at different follow-up time points. I know that the ?PredictABEL? Package contains functions for NRI and IDI calculation but it is unclear for me if it allows censored observation. Package ?survIDINRI? calculates only continuous NRI and the function of Package ?Hmi...
2005 Oct 25
0
One more about Error in step() (or stepAIC) for Cox model
Thank you for Prof.Ripley's suggestion. I fixed the program by adding a lower scope, and the program ran, but I still got warning messages, and don't know what is going on, would this affect my results? ... Step: AIC= 12337.74 Surv(tlfup, cen) ~ MI[[j]]$trt + MI[[j]]$agem40 + MI[[j]]$agem40sq + mhtypeed1 + mhtypeed2 Df AIC <none> 12338 -
2005 Jul 11
1
validation, calibration and Design
...w that the nomogram is significantly different to an existing model based on 60 month survival data generated by it (eg by McNemar's test). Hence, somewhat shortened: #using R 2.01 on Windows library(Hmisc) library(Design) data1 #dataframe with predictor variables A and B, cens and time columns (months) ddist1 <- datadist(data1) options(datadist='ddist1') s1 <- Surv(data1$time, data1$cens) cph.nomo <- cph(s1 ~ A+B, surv=T, x=T, y=T, time.inc=60) survcph <- Survival(cph.nomo, x=T, y=T, time.inc=60, surv=T) surv5 <- function(l...
2004 Jun 04
1
use of "rcorr.cens" with binary response?
Dear R-helpers, I recently switched from SAS to R, in order to model the occurrence of rare events through logistic regression. Is there a package available in R to calculate the Goodman-Kruskal Gamma? After searching a bit I found a function "rcorr.cens" which should do the job, but it is not clear to me how to define the input vectors? Is "x" a vector with the fitted probabilities and "s" a vector containing the observed response variable? Or does anybody know an alternative? Any help would be greatly appreciated, Thanks...
2007 Aug 16
1
Question about sm.options & sm.survival
Hi, there: It's my first time to post question in this forum, so thanks for your tolerance if my question is too naive. I am using a nonparametric smoothing procedure in sm package to generate smoothed survival curves for continuous covariate. I want to truncate the suvival curve and only display the part with covariate value between 0 and 7. The following is the code I wrote: