Displaying 20 results from an estimated 10000 matches similar to: "Simulating from a 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 Feb 22
0
Generate a Weibull regression data
Hi all,
I'm trying to generate a Weibull distribution including four covariates in
the model. Here is the code I used:
# Generate survival time
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
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 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
2009 Jul 16
2
Weibull Prediction?
I am trying to generate predictions from a weibull survival curve but it
seems that the predictions assume that the shape(scale for
survfit) parameter is one(Exponential but with a strange rate estimate?).
Here is an examle of the problem, the smaller the shape is the worse the
discrepancy.
### Set Parameters
scale<-10
shape<-.85
### Find Mean
scale*gamma(1 + 1/shape)
### Simulate Data
2001 Aug 28
2
Estimating Weibull Distribution Parameters - very basic question
Hello,
is there a quick way of estimating Weibull parameters for some data points
that are assumed to be Weibull-distributed?
I guess I'm just too lazy to set up a Maximum-Likelihood estimation...
...but maybe there is a simpler way?
Thanks for any hint (and yes, I've read help(Weibull) ;)
Kaspar Pflugshaupt
--
Kaspar Pflugshaupt
Geobotanical Institute
ETH Zurich, Switzerland
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 Jan 29
1
r-help; weibull parameter estimate
Hello,
If i write a function as below using log of weibull distribution i do not get the required
results in estimating the parameters what do i do, please
a/b * (t/b)^a-1 * exp(-t/b)^a
n=500
x<-rweibull(n,2,2)
z<-function(p) {(-n*log(p[1])+n*log(p[2])-
(p[1]-1)*sum(log(x))+(p[1]-1)*log(p[2])+(sum(x/p[2])^(p[1])) )}
zz<-optim(c(0.5,0.5),z)
zz
[[alternative HTML version deleted]]
2008 Jun 28
1
How to estimate the parameters in a bivariate weibull distribution?
Hi,Dear all R experts,
As far as I know, fitdistr() is only to estimate the parameters in univariate distributions. I have a set of data (x,y) and I assume it follows a bivariate weibull distribution. Could someone tell me a function in R that is suitable for parameter estimation in multivariate cases? Thanks in advance!
Cheers,
YAN
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
2006 Sep 21
1
survival function with a Weibull dist
Hi
I am using R to fit a survival function to my data
(with a weibull distribution).
Data: Survival of individuals in relation to 4
treatments ('a','b','c','g')
syntax:
---- > survreg(Surv(date2)~males2, dist='weibull')
But I have some problems interpreting the outcome and
getting the parameters for each curve.
--------- Value Std.
2011 Sep 14
2
Weibull point process
Dear list,
I'm looking for a function to generate (simulate) a random Weibull
point process. Can anyone help?
Cheers,
Torbj?rn Ergon, University of Oslo
2006 May 11
2
Maximum likelihood estimate of bivariate vonmises-weibull distribution
Hi,
I'm dealing with wind data and I'd like to model their distribution in
order to simulate data to fill-in missing values. Wind direction are
typically following a vonmises distribution and wind speeds follow a
weibull distribution. I'd like to build a joint distribution of
directions and speeds as a VonMises-Weibull bivariate distribution.
First is this a stupid question? I'm
2014 Mar 04
1
[GSoC student proposal] Implementation of Modified Weibull-G Family Distribution in R
Dear Brian and R team,
I am Dr. Aleem and I want to participate as a student in GSoC 2014 in the
development of R. I have extensive experience in Statistical research and
development and I am a student of advanced statistics applications. I
strongly believe that the inclusion of Modified Weibull-G Family
Distribution in R will significanlty help the reseasrch community in doing
2009 Mar 22
1
Estimating LC50 from a Weibull distribution
I am attempting to estimate LC50 (analogous to LD50, but uses exposure
concentration rather than dose) by fitting a Weibull model; but I
can't seem to get it to work. From what I can gather, I should be
using survreg() from the survival package. The survreg() function
relies on time-to-event data; my data result from 96 h exposures
(i.e., dead or alive after a fixed period; 96 h). I've
2013 Oct 28
0
"Optimization fail" error from fitdistr (Weibull distribution)
Hello everyone,
This is Kangmin.
I am trying to produce shape and scale of my wind data. My data is based on
wind speed frequency with 1km/hr increment. data is described below.
Windspeed (km/h) Frequency
1 351
2 147
3 317
4 378
5 527
6 667
7 865
8 970
9 987
10 907
11 905
12 642
13 1000
14 983
15 847
16 842
17 757
18 698
19 632
20 626
21 599
22 529
23 325
24 391
2011 Aug 17
0
vglm regression with weibull distribution
Dear all,
I'm facing a problem in estimation of glm model with weibull distribution. I run this :
eqn0<-formula(fdh~cup1+cup2+cup3+cup4+fin1+vd1+cm2+cm4+milieu+cpro1+cpro2+cpro3a+cpro3b+schef+log(y))
regWeib0<-vglm(eqn0,family=weibull,subset(br, fdh<1))
I have en estimation but there is a message saying that regularity conditions are violated :
Message d'avis :
In eval(expr,
2008 Oct 22
2
Weibull parameter estimation
Dear R-users
I would like to fit weibull parameters using "Method of moments" in order to
provide the inital values of the parameter to de function 'fitdistr' . I
don`t have much experience with maths and I don't know how to do it.
Can anyone please put me in the rigth direction?
Borja
[[alternative HTML version deleted]]
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
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