classify_adopters function

Classify adopters accordingly to Time of Adoption and Threshold levels.

Classify adopters accordingly to Time of Adoption and Threshold levels.

Adopters are classified as in Valente (1995). In general, this is done depending on the distance in terms of standard deviations from the mean of Time of Adoption and Threshold.

classify_adopters(...) classify(...) ## S3 method for class 'diffnet' classify_adopters(graph, include_censored = FALSE, ...) ## Default S3 method: classify_adopters( graph, toa, t0 = NULL, t1 = NULL, expo = NULL, include_censored = FALSE, ... ) ## S3 method for class 'diffnet_adopters' ftable(x, as.pcent = TRUE, digits = 2, ...) ## S3 method for class 'diffnet_adopters' as.data.frame(x, row.names = NULL, optional = FALSE, ...) ## S3 method for class 'diffnet_adopters' plot(x, y = NULL, ftable.args = list(), table.args = list(), ...)

Arguments

  • ...: Further arguments passed to the method.
  • graph: A dynamic graph.
  • include_censored: Logical scalar, passed to threshold.
  • toa: Integer vector of length nn with times of adoption.
  • t0: Integer scalar passed to threshold and toa_mat.
  • t1: Integer scalar passed to toa_mat.
  • expo: Numeric matrix of size nTn*T with network exposures.
  • x: A diffnet_adopters class object.
  • as.pcent: Logical scalar. When TRUE returns a table with percentages instead.
  • digits: Integer scalar. Passed to round.
  • row.names: Passed to as.data.frame.
  • optional: Passed to as.data.frame.
  • y: Ignored.
  • ftable.args: List of arguments passed to ftable.
  • table.args: List of arguments passed to table.

Returns

A list of class diffnet_adopters with the following elements: - toa: A factor vector of length nn with 4 levels: "Early Adopters", "Early Majority", "Late Majority", and "Laggards"

  • thr: A factor vector of length nn with 4 levels: "Very Low Thresh.", "Low Thresh.", "High Thresh.", and "Very High Thresh."

Details

Classifies (only) adopters according to time of adoption and threshold as described in Valente (1995). In particular, the categories are defined as follow:

For Time of Adoption, with toa as the vector of times of adoption:

  • Early Adopters: toa[i] \<= mean(toa) - sd(toa),
  • Early Majority: mean(toa) - sd(toa) \< toa[i] \<= mean(toa),
  • Late Majority: mean(toa) \< toa[i] \<= mean(toa) + sd(toa), and
  • Laggards: mean(toa) + sd(toa) \< toa[i].

For Threshold levels, with thr as the vector of threshold levels:

  • Very Low Thresh.: thr[i] \<= mean(thr) - sd(thr),
  • Low Thresh.: mean(thr) - sd(thr) \< thr[i] \<= mean(thr),
  • High Thresh.: mean(thr) \< thr[i] \<= mean(thr) + sd(thr), and
  • Very High. Thresh.: mean(thr) + sd(thr) \< thr[i].

By default threshold levels are not computed for left censored data. These will have a NA value in the thr vector.

The plot method, plot.diffnet_adopters, is a wrapper for the plot.table method. This generates a mosaicplot plot.

Examples

# Classifying brfarmers ----------------------------------------------------- x <- brfarmersDiffNet diffnet.toa(x)[x$toa==max(x$toa, na.rm = TRUE)] <- NA out <- classify_adopters(x) # This is one way round( with(out, ftable(toa, thr, dnn=c("Time of Adoption", "Threshold")))/ nnodes(x[!is.na(x$toa)])*100, digits=2) # This is other ftable(out) # Can be coerced into a data.frame, e.g. ------------------------------------ str(classify(brfarmersDiffNet)) ans <- cbind( as.data.frame(classify(brfarmersDiffNet)), brfarmersDiffNet$toa ) head(ans) # Creating a mosaic plot with the medical innovations ----------------------- x <- classify(medInnovationsDiffNet) plot(x)

References

Valente, T. W. (1995). "Network models of the diffusion of innovations" (2nd ed.). Cresskill N.J.: Hampton Press.

See Also

Other statistics: bass, cumulative_adopt_count(), dgr(), ego_variance(), exposure(), hazard_rate(), infection(), moran(), struct_equiv(), threshold(), vertex_covariate_dist()

Author(s)

George G. Vega Yon

  • Maintainer: George Vega Yon
  • License: MIT + file LICENSE
  • Last published: 2023-08-30

Downloads (last 30 days):