bootstrap: bootstrap replicates of the degradation matrix

Description Usage Arguments Value

Description

This function randomly samples assets from the original data (keeping the same number of assets, which may result in a different number of records), and calculates the degradation matrix. It repeats this nboot times

Usage

1
2
3
bootstrap(data, labels, date_format = "%d-%b-%Y", end_date = NULL,
  removeSingleton = TRUE, transInterval = 1, ObservedOnly = FALSE,
  nboot = 10)

Arguments

data

A data frame consisting of at least three columns. The first column must be the asset ID, the second column is the inspection date, and the third column is the rating. The inspections must be in chronological order for each asset

labels

A vector listing all the different asset ratings that occur. Not every rating in labels must occur in the data, but there can't be ratings in the data that don't occur in labels. Note that the order specified in labels determines the ordering of the rows and columns in the transition matrix.

date_format

A string (i.e. in quotations) giving the format of the date column of data. The format descriptions allowed are described at http://www.r-bloggers.com/date-formats-in-r/

end_date

= If ObservedOnly=FALSE, then the calculation assumes that the asset rating does not change from the last observation time. The total amount of time used in the calculation is determined by end_date. I.e., if the last inspection was 2012 and end_date was 2015, then this would add 3 years tothe total. If not value is specified, then the date of the last observation is used.

removeSingleton

a logical value indicating whether to remove assets that only have a single observation recorded or not. If FALSE, then assets with only a single observation are assumed to stay in that state through to end_date

transInterval

length of transition interval considered in years. Defaults to 1 year.

ObservedOnly

a logical value indicating whether to assume that assets remained in their current condition from the last inspection date until end_date, or whether just to count the time between observations.

nboot

the number of bootstrap replicates

Value

A list of nboot degradation matrix estimates. These are all estimates that are consistent with the data.


rich-d-wilkinson/transprob documentation built on May 27, 2019, 7:41 a.m.