extract_indiv_data function

Extract the individual level data from the dataset for use in posterior analysis

Extract the individual level data from the dataset for use in posterior analysis

extract_indiv_data(data, data_cols = NULL)

Arguments

  • data: The dataset
  • data_cols: The individual level columns of attributes - Can be null to take aggregate for each column

Returns

dataframe of all individual level data for each ID

Examples

data("Train", package="mlogit") Train$ID <- Train$id Train$CHOICE <- as.numeric(Train$choice) #in this case not actually individual data columns #an ID column is required here extract_indiv_data(Train, c('comfort_A', 'comfort_B'))
  • Maintainer: Joseph Molloy
  • License: GPL (>= 2)
  • Last published: 2024-02-07