Displaying 20 results from an estimated 1000 matches similar to: "R-Censoring"
2007 Oct 29
3
using survfit
hie
when i use plot.survfit to plot more than one graph why I only see the last graph how do i see the other graphs.for example
n=20
n1=n/2
n2=n/4
a11=4;a12=4 ;a21=4 ;a22=4
t1<-array(1,c(n1))
t2<-array(2,c(n1))
treatgrp=matrix(c(t1,t2))
2008 Oct 28
2
Fitting weibull and exponential distributions to left censoring data
Dear R-users
I have some datasets, all left-censoring, and I would like to fit
distributions to (weibull,exponential, etc..). I read one solution using the
function survreg in the survival package. i.e
survreg(Surv(...)~1, dist="weibull") but it returns only the scale
parameter.
Does anyone know how to successfully fit the exponential, weibull etc...
distributions to left-censoring
2007 Oct 18
1
programming question
hie
i'm tryimg to generate two survival data using the following code (I know its ugly ) but it seems to repeat two of the variables can any one tell me whats the porblem.
n=20
n1=n/2
n2=n/4
a11=1 ;a12=1.4 ;a21=16 ;a22=a12 * a21
t1<-array(1,c(n1))
t2<-array(2,c(n1))
treatgrp=matrix(c(t1,t2))
2012 Apr 11
1
R-help; generating censored data
Hello,
?can i implement this as 10% censored data where t gives me failure and x censored.
Thank you
p=2;b=120
n=50
set.seed(132);
r<-sample(1:50,45)
t<-rweibull(r,shape=p,scale=b)
t
set.seed(123);?
cens <- sample(1:50, 5)?
x<-runif(cens,shape=p,scale=b)?
x
Chris Guure
Researcher,
Institute for Mathematical Research
UPM
2012 Mar 06
1
Scale parameter in Weibull distribution
Hi all,
I'm trying to generate a Weibull distribution including four covariates in
the model. Here is the code I used:
T = rweibull(200, shape=1.3,
scale=0.004*exp(-(-2.5*b1+2.5*b2+0.9*x1-1.3*x2)/1.3))
C = rweibull(n, shape=1.5, scale=0.008) #censoring time
time = pmin(T,C) #observed time is min of censored and true
event = time==T # set to 1 if event is observed
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)
2000 May 12
2
Error: Permission denied, please try again.
Greetings: I hope it is okay to post this here. I have RedHat 6.1 on
Intel. I believe I followed the instructions correctly.
Everything seemed to compile without errors but when I try to log in I get
the above error - any advice? I've poked through the FAQ and man pages with
no luck.
Thanks for any and all replies,
Mike
[root at ghana openssh-2.1.0]# ssh -v -l mweaver ghana
SSH Version
2011 Dec 19
1
Calculating the probability of an event at time "t" from a Cox model fit
Dear R-users,
I would like to determine the probability of event at specific time using
cox model fit. On the development sample data I am able to get the
probability of a event at time point(t).
I need probability score of a event at specific time, using scoring scoring
dataset which will have only covariates and not the response variables.
Here is the sample code:
n = 1000
beta1 = 2; beta2 =
2012 Nov 10
3
sample mean, variance and SD
hi
could you help me to solve this issue
Question:
Using command rweibull(100,8,15), simulate n = 100 realizations from
Weibull(8; 15) distribution. Using the simulated sample, compute the sample
mean, variance and standard deviation of these observations.
I am trying like this
sim<-rweibull(100,8,15) # simulated sample
SM<-mean(sim) # simulated sample mean
var(sim) # variance
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
1999 Aug 30
1
rexp and rweibull
In splus rexp() and rweibull() are related:
> set.seed(153)
> rexp(1)
[1] 0.0493267
> set.seed(153)
> rweibull(1, shape=1)
[1] 0.0493267
(you can also try shape =2, then rweibull = sqrt(rexp) )
However, in rw0.64.1 (on Win NT) they are different
> .Random.seed <- 1:4
> rexp(1)
[1] 1.412030
> .Random.seed <- 1:4
> rweibull(1, shape=1)
[1] 2.054032
May be rweibull
2011 Apr 27
3
MASS fitdistr with plyr or data.table?
I am trying to extract the shape and scale parameters of a wind speed
distribution for different sites. I can do this in a clunky way, but
I was hoping to find a way using data.table or plyr. However, when I
try I am met with the following:
set.seed(144)
weib.dist<-rweibull(10000,shape=3,scale=8)
weib.test<-data.table(cbind(1:10,weib.dist))
2008 Oct 07
3
Fitting weibull, exponential and lognormal distributions to left-truncated data.
Dear All,
I have two questions regarding distribution fitting.
I have several datasets, all left-truncated at x=1, that I am attempting
to fit distributions to (lognormal, weibull and exponential). I had
been using fitdistr in the MASS package as follows:
fitdistr<-(x,"weibull")
However, this does not take into consideration the truncation at x=1. I
read another posting in this
2007 Oct 19
0
calculating power of log rank test
hie
Im trying to calculate the power of the logrank test for different values of rho .I was just wandering whether the following programme would do it. any suggestions are welcome
s=50
number=1
count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count7=0;
count8=0;count9=0
while(s!=0){
n=20
n1=n/2
2003 Jul 28
1
Optimization failed in fitting mixture 3-parameter Weibull distri bution using fitdistr()
Dear All;
I tried to use fitdistr() in the MASS library to fit a mixture
distribution of the 3-parameter Weibull, but the optimization failed.
Looking at the source code, it seems to indicate the error occurs at
if (res$convergence > 0)
stop("optimization failed").
The procedures I tested are as following:
>w3den <- function(x, a,b,c)
2008 Feb 14
0
help in simplyfiying programme
my program given below can some one make it presentable. I trying to simulate survival data and calculate the power. I think i could have done better.
s=10
number=0
count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count8=0;
count9=0;
count11=0;count22=0;count33=0;count44=0;count55=0;count66=0;count77=0;
count88=0;count99=0;
while(s!=0){
n=100
n1=n/2
n2=n/4
2019 Feb 28
1
Using butt in same mount point that is used for relay
Thank you
Pada tanggal Kam, 28 Feb 2019 10.01 mas wanto <wantom428 at gmail.com menulis:
> Sam broadcaster and fallback mount
>
> Pada tanggal Kam, 28 Feb 2019 09.58 Leonardo Oliveira Ortiz <
> leonardo.ortiz at marisolsa.com menulis:
>
>> Hello.
>>
>>
>>
>> We are using icecast to relay a radio station on local network and I have
>> a
2004 Jul 28
2
Simulation from a model fitted by survreg.
Dear list,
I would like to simulate individual survival times from a model that has been fitted using the survreg procedure (library survival). Output shown below.
My plan is to extract the shape and scale arguments for use with rweibull() since my error terms are assumed to be Weibull, but it does not make any sense. The mean survival time is easy to predict, but I would like to simulate
2012 Dec 13
2
simulate time data
Hi,
Does anyone know how to write a command to generate time-to-event data for Cox's regression?
Scomet
[[alternative HTML version deleted]]