The Hazard function is used in survival analysis. It is the estimated number of events divided by the number of persons or units at risk for the particualr event per unit time.
Questions tagged [hazard]
59 questions
11
votes
1 answer
Confidence intervals of the muhaz package hazard function
The muhaz package estimates the hazard function from right censored data using kernel smoothing methods. My question is, is there any way to obtain confidence intervals for the hazard function that muhaz calculates?…

ECII
- 10,297
- 18
- 80
- 121
5
votes
1 answer
calculating hazard function for the standard normal distribution
Based on formulas given in the Mathematica UUPDE database
I've plotted the hazard function for the standard normal distribution in R.
It seems to be correct in certain range; the numerical issues occur for larger values, see attached figure. Below…

mjs
- 150
- 1
- 20
3
votes
0 answers
Restricted Cubic Spline Plot of Hazard Ratios
df <- data.frame(PatientID = c("0002" ,"0002", "0005", "0005" ,"0009" ,"0009" ,"0018", "0018" ,"0039" ,"0039" , "0043" ,"0043", "0046", "0046" ,"0048" ,"0048"),
time = c( 1961.810 , 929.466 , 978.166, 1005.820 , 925.752 , 969.469 …

Lili
- 547
- 6
- 19
2
votes
1 answer
Calculate hazard from digitized survival curves
I have digitized published survival curves and got the following (Survival,time) points
df<-structure(list(Survival = c(1, 1, 1, 1, 1, 1, 0.99, 0.99, 0.99,
0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99,
0.99, 0.99, 0.99, 0.99,…

ECII
- 10,297
- 18
- 80
- 121
2
votes
1 answer
Remove dotted confidence interval lines and amend legend
How do I remove the confidence interval dotted lines from the plot?
For the legend, why is line 2 dotted while line 1 is solid? Is there a way to make both solid lines? I'm not sure what this code does - lty=1:2, cex=0.8
I have attached one of my…

user2310
- 31
- 1
- 5
1
vote
0 answers
Proportional Hazards for Interval2 censored data
I am trying to get proportional hazards for the survival object.
survobj1_2 <- Surv(time = as.numeric(set_1_2$int_1), time2 = as.numeric(set_1_2$int_2),
type = 'interval2')
I have tried using coxph() but it does not deal with…

Hari
- 41
- 3
1
vote
0 answers
Cox regression model with a time-dependent covariate, in R
I want to study which variables are possible risk factors for the non-relapse mortality event variable in a sample of patients with a hematologic disease that received a stem cell transplant.
I have created, first, univariate models with the…

EI_Stats
- 21
- 2
1
vote
1 answer
Calculation of shape parameter and scale parameter from vaues of cumulative hazard function
The Weibull probability density function is given as such:
and the cumulative hazard function is represented as:
Now, I have a dataset where, the t and H are known as such:
## Import libraries
from scipy.optimize import curve_fit
from scipy import…

NN_Developer
- 417
- 6
1
vote
1 answer
How do I change confidence interval calculation to log-log on R?
If I wanted to calculate confidence intervals using the coxph and confinf functions, how do I change the confidence interval calculation to log-log? My understanding is that log is the default.
I tried conf.type="log-log" but it did not work, just…

Rproject
- 11
- 2
1
vote
1 answer
Generate Random Survival Times From A Hazard Function Applying A Hazard Rate with flexsurv
Please consider the following:
My aim is to draw random survival times from a flexible parametric multi-state model fitted with flexsurvreg (more specifically msfit.flexsurvreg) and applying some hazard ratio (HR, in this example set to 0.2).
I…

Frederick
- 810
- 8
- 28
1
vote
1 answer
Cumulative hazard curve fitting
How technically it possible to prolong the cumulative hazard curves until day 80 if in my original data I have follow-up time until 50 day? The cumulative results estimates will remain the same just that both lines are the same until day 80.
I used…
user18454320
1
vote
0 answers
Survey design for multilevel analysis
I am new in using R, and I need to run a multilevel analysis (two-phase design on two levels) using Cox frailty survival model on a survey data (Nigeria Demographic and Health Survey Data).
My problem is how to write the design weight using the two…

Ugonna
- 21
- 2
1
vote
0 answers
Extrapolate survival probabilities after a certain time
I have hazard rates for different time periods and I estimated survival probabilities for different time periods. I would like to estimate survival probabilities for future time periods.
Here is the table I created on excel hazard rates & survival…

Srinivasan Gopalan
- 11
- 1
1
vote
2 answers
How to plot the Hazard Ratio + CI over time of survival data in ggplot in R?
Background
I want to plot the hazard ratio over time, including its confidence intervals, of a survival dataset. As an example, I will take a simplified dataset from the survival package: the colon dataset.
library(survival)
library(tidyverse)
#…

user213544
- 2,046
- 3
- 22
- 52
1
vote
1 answer
Similar to cox regression hazard model, can we get survival curves and hazard ratios using survivalsvm?
I am a beginner, trying to do survival analysis using machine learning on the lung cancer dataset. I know how to do the survival analysis using the Cox proportional hazard model. Cox proportional hazard model provides us the hazard ratios, which are…

ankush jamthikar
- 107
- 1
- 8