hazard_rate(obj, no.plot = FALSE, include.grid = TRUE, ...)
plot_hazard(x, main = "Hazard Rate", xlab = "Time", ylab = "Hazard Rate", type = "b", include.grid = TRUE, bg = "lightblue", add = FALSE, ylim = c(0, 1), pch = 21, ...)
"plot"(x, y = NULL, main = "Hazard Rate", xlab = "Time", ylab = "Hazard Rate", type = "b", include.grid = TRUE, bg = "lightblue", pch = 21, add = FALSE, ylim = c(0, 1), ...)pardiffnet_hr.par.plot.par.diffnet_hr.
The class of the object is only used by the S3 plot method.
$$\frac{q_t - q_{t-1}}{n - q_{t-1}}$$
where $q(i)$ is the number of adopters in time $t$, and $n$ is the number of vertices in the graph.
In survival analysis, hazard rate is defined formally as
$$% \lambda(t)=\lim_{h\to +0}\frac{F(t+h)-F(t)}{h}\frac{1}{1-F(t)} % $$
Then, by approximating $h=1$, we can rewrite the equation as
$$% \lambda(t)=\frac{F(t+1)-F(t)}{1-F(t)} % $$
Furthermore, we can estimate $F(t)$, the probability of not having adopted the innovation in time $t$, as the proportion of adopters in that time, this is $F(t) ~ q(t)/n$, so now we have
$$% \lambda(t)=\frac{q_{t+1}/n-q_t/n}{1-q_t/n} = \frac{q_{t+1} - q_t}{n - q_t} % $$
As showed above.
The plot_hazard function is an alias for the plot.diffnet_hr method.
Wooldridge, J. M. (2010). Econometric Analysis of Cross Section and Panel Data (2nd ed.). Cambridge: MIT Press.
classify_adopters,
cumulative_adopt_count, dgr,
ego_variance, exposure,
infection, moran,
struct_equiv, threshold,
vertex_covariate_distOther visualizations: dgr,
diffusionMap, drawColorKey,
grid_distribution,
plot_adopters, plot_diffnet2,
plot_diffnet,
plot_infectsuscep,
plot_threshold,
rescale_vertex_igraph
# Creating a random vector of times of adoption
toa <- sample(2000:2005, 20, TRUE)
# Computing cumulative adoption matrix
cumadopt <- toa_mat(toa)$cumadopt
# Visualizing the hazard rate
hazard_rate(cumadopt)
Run the code above in your browser using DataLab