DocumentationHelp CenterDocumentation
Compute hazard rates based on default probability curve
OutRates = hazardrates(obj)
example
OutRates = hazardrates(obj) computes hazard rates based on a defprobcurve object.
OutRates
obj
defprobcurve
collapse all
Create a defprobcurve object using defprobcurve and then use hazardrates to calculate the hazard rates.
hazardrates
Settle = datetime(2017,9,20); DefProbTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]; DefaultProbabilities = [0.005 0.007 0.01 0.015 0.026 0.04 0.077 0.093 0.15 0.20]'; ProbDates = Settle + DefProbTimes; DefaultProbCurve = defprobcurve(Settle,ProbDates,DefaultProbabilities,'Basis',5)
DefaultProbCurve = defprobcurve with properties: Settle: 20-Sep-2017 Basis: 5 Dates: [10x1 datetime] DefaultProbabilities: [10x1 double]
hazardrates(DefaultProbCurve)
ans = 10×1 0.0100 0.0040 0.0030 0.0051 0.0112 0.0145 0.0197 0.0058 0.0065 0.0061
defprobcurve object, specified as a previously created defprobcurve object.
Data Types: object
object
Hazard rates, returned as a numeric.
defprobstrip | survprobs
defprobstrip
survprobs
Tiene una versión modificada de este ejemplo. ¿Desea abrir este ejemplo con sus modificaciones?
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office