similar to: R-help; generating censored data

Displaying 20 results from an estimated 3000 matches similar to: "R-help; generating censored data"

2012 Apr 11
1
R-help; Censoring
Hello, I wish to?censor 10% of my sample units of 50 from a Weibull distribution. Below is the code for it. I will need to know whether what i have done is correct and if not, can i have any suggestion to improve it? Thank you ?p=2;b=120 n=50 r=45 t<-rweibull(r,shape=p,scale=b) meantrue<-gamma(1+(1/p))*b meantrue cen<- runif(n-r,min=0,max=meantrue) cen Chris Guure Researcher,
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<-c(t,cen)
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
2012 Apr 14
0
R-help: Censoring data (actually an optim issue
Your function is giving NaN's during the optimization. The R-forge version of optimx() has functionality specifically intended to deal with this. NOTE: the CRAN version does not, and the R-forge version still has some glitches! However, I easily ran the code you supplied by changing optim to optimx in the penultimate line. Here's the final output. KKT condition testing Number of
2006 Oct 27
1
Censored Brier Score and Royston/Sauerbrei's D
System: R 2.3.1 on a Windows XP computer. I am validating several cancer prognostic models that have been published with a large independent dataset. Some of the models report a probability of survival at a specified timepoint, usually at 5 and 10 years. Others report only the linear predictor of the Cox model. I have used Harrell's c index for censored data (rcorr.cens) as a measure of
2012 Feb 05
1
R- Fisher Information
Dear All, Can you help me, with the code below how do I obtain the fisher information from it. Is my q<-replicate(1000,x) the right way to do simulation. thank you. x<-rweibull(100,0.8,1.5) q<-replicate(1000,x) z<-function(p){ beta<-p[1] eta<-p[2] log1<-(n*log(beta)-n*beta*log(eta)+(beta-1)*sum(log(x))-sum((x/eta)^beta)) return(-log1) } zz<-optim(c(0.5,0.5),z) zz Chris
2012 Aug 29
2
Estimation parameters of lognormal censored data
Hi, I am trying to get the maximum likelihood estimator for lognormal distribution with censored data;when we have left, interval and right censord. I built my code in R, by writing the deriving of log likelihood function and using newton raphson method but my estimators were too high " overestimation", where the values exceed the 1000 in some runing of my code. is there any one can
2007 Jun 18
1
psm/survreg coefficient values ?
I am using psm to model some parametric survival data, the data is for length of stay in an emergency department. There are several ways a patient's stay in the emergency department can end (discharge, admit, etc..) so I am looking at modeling the effects of several covariates on the various outcomes. Initially I am trying to fit a survival model for each type of outcome using the psm
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:
2004 Apr 21
1
Boot package
Dear mailing list, I tried to run the example for the conditional bootstap written in the help file of censboot. I got the following result: STRATIFIED CONDITIONAL BOOTSTRAP FOR CENSORED DATA Call: censboot(data = aml, statistic = aml.fun, R = 499, F.surv = aml.s1, G.surv = aml.s2, strata = aml$group, sim = "cond") Bootstrap Statistics : original bias std. error t1*
2012 Nov 07
2
R: net reclassification index after Cox survival analysis
Dear all, I am interested 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
2012 May 30
5
problem with ifelse
Dear all, ?The code below is used to generate interval censored data but unfortunately there is an error with the ifelse which i am not able to rectify. ?Can somebody help correct it for me. Thank you t<-rexp(20,0.2)? v<-c(0,m,999)? y<-function(t,v){ ? z<-numeric(length(t (( ? ? s<-numeric(length(t (( ? ? ? for(i in 1:length(t)){ ? ? ? ? for(j in 1:length(v-1))? ? ? ? ? { ifelse
2012 Mar 29
2
matrix with Loop
Hello! I got something to ask..whether you can help me with the R program...i got this for example 5x4 matrix..and i want to find: ?i) mean for each row of the matrix ii) median for each column of the matrix and i need to do this using a loop function...below is my program..u try to check it for me as the output that i got is not what i desired...thanks.. data<-rnorm(20,0,1)
2013 Apr 15
2
regression with paired left-censored data
HI I am trying to analyse data which is left-censored (i.e. has values below the detection limit). I have been using the NADA package of R to derive summary statistics and do some regression. I am now trying to carry out regression on paired data where both my X and Y have left-censored data within them. I have tried various commands in R: rega = cenreg(Cen(conc, cens_ind) ~ Gp_ident))? with
2005 Jul 11
1
validation, calibration and Design
Hi R experts, I am trying to do a prognostic model validation study, using cancer survival data. There are 2 data sets - 1500 cases used to develop a nomogram, and another of 800 cases used as an independent validation cohort. I have validated the nomogram in the original data (easy with the Design tools), and then want to show that it also has good results with the independent data using 60
2012 Feb 05
2
R-Censoring
Hi there, can somebody give me a guide as to how to generate data from weibull distribution with censoring for example, the code below generates only failure data, what do i add to get the censored data, either right or interval censoring q<-rweibull(100,2,10). Thank you Grace Kam student, University of Ghana [[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, ...)
2009 Mar 09
1
rcorr.cens Goodman-Kruskal gamma
Dear r-helpers! I want to classify my vegetation data with hierachical cluster analysis. My Dataset consist of Abundance-Values (Braun-Blanquet 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
2008 Jan 25
2
Help Me to Adjust the R Code
Hi, The following code, from Angelo Canty article on line "Resampling Methods in R: the boot Package, 2002", works fine for Angelo Canty using R 2.6.0 on Windows XP. It also works for me using R 1.2.1 and S-PLUS 2000 on Windows XP after installing the S-PLUS bootstrap library, with slight differences in my outputs. > library(boot) > library(survival) >
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))