Home:ALL Converter>Use the cumulative distribution function of Weibull in R

Use the cumulative distribution function of Weibull in R

Ask Time:2013-07-21T11:27:53         Author:Golan_trevize

Json Formatter

I have to simulate a system's fail times, to do so I have to use the Weibull distribution with a "decreasing hazard rate" and a shape of "0.7-0.8". I have to generate a file with 100 results for the function that uses random numbers from 0 to 1.

So I've been searching a bit and I found this R function:

    pweibull(q, shape, scale = 1, lower.tail = T, log.p = F)

There are some other (rweibull,qweibull...) but I think this is the one that I have to use, since is the cumulative distribution one, as the exercise statement says. The problem is that I am new to R and that I don't really know what parameters I have to pass to this function.

I'm guessing shape should be 0.7-0.8, and scale 1. For q parameter, should I create a random vector of 100 numbers with 0 to 1 values? If so, any tip of how to do it? Also any tip on how to export the resultant data to a file?

Author:Golan_trevize,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/17768765/use-the-cumulative-distribution-function-of-weibull-in-r
yy