similar to: r-help; weibull distribution

Displaying 20 results from an estimated 9000 matches similar to: "r-help; weibull distribution"

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 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
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
2011 Oct 20
1
R code Error : Hybrid Censored Weibull Distribution
Dear Sir/madam, I'm getting a problem with a R-code which calculate Fisher Information Matrix for Hybrid Censored Weibull Distribution. My problem is that: when I take weibull(scale=1,shape=2) { i.e shape>1} I got my desired result but when I take weibull(scale=1,shape=0.5) { i.e shape<1} it gives error : Error in integrate(int2, lower = 0, upper = t) : the integral is probably
2008 Dec 23
6
Interval censored Data in survreg() with zero values!
Hello, I have interval censored data, censored between (0, 100). I used the tobit function in the AER package which in turn backs on survreg. Actually I'm struggling with the distribution. Data is asymmetrically distributed, so first choice would be a Weibull distribution. Unfortunately the Weibull doesn't allow for zero values in time data, as it requires x > 0. So I tried the
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]]
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
2008 Apr 08
1
Weibull maximum likelihood estimates for censored data
Hello! I have a matrix with data and a column indicating whether it is censored or not. Is there a way to apply weibull and exponential maximum likelihood estimation directly on the censored data, like in the paper: Backtesting Value-at-Risk: A Duration-Based Approach, P Chrisoffersen and D Pelletier (October 2003) page 8? The problem is that if I type out the code as below the likelihood
2012 Jan 26
1
3-parametric Weibull regression
Hello, I'm quite new to R and want to make a Weibull-regression with the survival package. I know how to build my "Surv"-object and how to make a standard-weibull regression with "survreg". However, I want to fit a translated or 3-parametric weibull dist to account for a failure-free time. I think I would need a new object in survreg.distributions, but I don't know how
2008 Apr 15
1
Weibull
Dear R users, This is a basic question. I want to fit a Weibull distribution. fitdistr(data, "weibull") works and it is a maximum likelihood fitting. Is it a good method ? Or is it better to write a function for the log-likelihood and the gradient and to use a numerical routine ? Fitdistr works for uncensored data, but what can I use for censored (and uncensored) data ? Thank you
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)
2010 Sep 19
1
Weibull- Random Censoring
I generate random vector from Weibull distribution sampWB <-urweibull(sampleSize, shape=shape.true, scale=scale.true, lb=0, ub=Inf) how can I create subvector containing 30% of samplesize of sampWB which should be assigned as Censored data? The probability for each value in sampWB can be uniform to be included in the subvector.
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
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,
2009 Dec 13
1
Non-linear Weibull model for aggregated parasite data
Hi, I am trying to fit a non-linear model for a parasite dataset. Initially, I tried log-transforming the data and conducting a 2-way ANCOVA, and found that the equal variance of populations and normality assumptions were violated. Gaba et al. (2005) suggests that the Weibull Distribution is best for highly aggregated parasite distributions, and performs better (lower type 1 and 2 error rates)
2007 Jul 25
1
Minitab Parametric Distribution Analysis in R
Minitab can perform a "Parametric Distribution Analysis - Arbitrary Censoring" with one of eight distributions (e.g., weibull), giving the maximum likelihood estimates of the parameters in the distribution for a given dataset. Does R have a package that provides equivalent functionality? Thanks for any advice you can offer. Tom La Bone [[alternative HTML version deleted]]
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
2011 Aug 26
2
How to generate a random variate that is correlated with a given right-censored random variate?
Hi, I have a right-censored (positive) random variable (e.g. failure times subject to right censoring) that is observed for N subjects: Y_i, I = 1, 2, ..., N. Note that Y_i = min(T_i, C_i), where T_i is the true failure time and C_i is the censored time. Let us assume that C_i is independent of T_i. Now, I would like to generate another random variable U_i, I = 1, 2, ..., N, which is
2005 Aug 10
2
Exponential, Weibull and log-logistic distributions in glm()
Dear R-users! I would like to fit exponential, Weibull and log-logistic via glm() like functions. Does anyone know a way to do this? Bellow is a bit longer description of my problem. Hm, could family() be adjusted/improved/added to allow for these distributions? SAS procedure GENMOD alows to specify deviance and variance functions to help in such cases. I have not tried that option and I do not
2008 Mar 02
1
Problem plotting curve on survival curve (something silly?)
OK this is bound to be something silly as I'm completely new to R - having started using it yesterday. However I am already warming to its lack of 'proper' GUI... I like being able to rerun a command by editing one parameter easily... try and do that in a Excel Chart Wizzard! I eventually want to use it to analyse some chemotherapy response / survival data. That data will not be