library(degradr)
library(dplyr)
# Load example data
data(train_FD001)
data(test_FD001)
data <- train_FD001 %>%
select(unit,t,T24,T50,P30,
Nf,Ps30,phi, NRf,
BPR,htBleed,
W31, W32) %>%
mutate(across(c(P30,phi,W31,W32), ~ . * -1))
test <- test_FD001 %>%
select(unit,t,T24,T50,P30,
Nf,Ps30,phi, NRf,
BPR,htBleed,
W31, W32) %>%
mutate(across(c(P30,phi,W31,W32), ~ . * -1))
# Fit a health index model (exponential trajectory of degree 2)
model <- fit_healthindex(data = data, type = "exponential",
degree = 2, r = 0.8)
#Probability that the run length will be less than or equal to 86 cycles
head(prul(t = 86, data = test, model = model))
Run the code above in your browser using DataLab