weibPmatch: Compute the shape or scale parameter for a Weibull...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Determine the shape or scale parameter of a Weibull distribution so it has event-free rate P0 at time x. If the shape is specified, the scale parameter is computed, and if the scale is specified, the shape parameter is computed.

Usage

1
weibPmatch(x, p0, shape, scale)

Arguments

x

Pre-specified time for the event-free endpoint (e.g., 1 year).

p0

Event-free rate at time x.

shape

If specified, the necessary scale parameter is computed

scale

If specified, the necessary shape parameter is computed

Details

The time and event-free rate must be supplied. Either the shape or scale parameter must also be specified, but not both. The R parameterization of the Weibull distribution is used.

Value

A single numerical value is returned, either the shape or scale parameter, depending on which is specified by the user.

Author(s)

Bo Huang <bo.huang@pfizer.com> and Neal Thomas <neal.thomas@pfizer.com>

References

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995) Continuous Univariate Distributions, volume 1, chapter 21. Wiley, New York.

See Also

weibull.plot,pweibull, OptimDes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
param <- c(1, 1.09, 2, 1.40)
x<-1

p0<-pweibull(x,param[1],param[2],lower=FALSE)
p1<-pweibull(x,param[3],param[4],lower=FALSE)

weibull.plot(param,x)

### equivalent to simple call
paramNew<-c(param[1], weibPmatch(x,p0,param[1]), param[3], weibPmatch(x,p1,param[3]))
weibull.plot(paramNew, x)

### null curve with different shape
paramNew<-c(3.0, weibPmatch(x,p0,3.0), param[3], weibPmatch(x,p1,param[3]))
weibull.plot(paramNew, x)

### alternative curve with different scale
paramNew<-c(param[1], param[2], weibPmatch(x,p1,scale=2), 2)
weibull.plot(paramNew, x)

OptInterim documentation built on May 2, 2019, 2:07 p.m.