Medoids | R Documentation |
This data set represents a potential data frame of cluster medoids' responses to selected asset variables, as generated by the function 'EconomicClusters'.
data(Medoids)
A data frame with 10 observations on 5 variables. To simplify the analysis for the sake of demonstration, this data frame was generated manually to mimic the medoids selected by the 'EconomicClusters' algorithm from 'data_for_EC', with variables as follows:
V2
a binary variable with levels 0, 1
V5
a binary variable with levels 0, 1
V6
a binary variable with levels 0, 1
V9
a categorical variable with levels 1 to 4
V11
a categorical variable with levels 1 to 4
The data frame 'Medoids' represents households within a simulated population selected as cluster medoids by the 'EconomicClusters' algorithm. The columns describe the medoids' responses to the 5 variables selected by the model. This data frame was generated manually.
This data set was simulated by the package authors in order to demonstrate the functionality of the 'EconomicClusters' package.
EconomicClusters
#We previously defined an economic clustering model for our population using 'EconomicClusters'. #We saved a data frame containing the responses to the economic questions #selected by the model for the cluster medoids as 'Medoids'. #We have since collected trauma registry data for 250 patients #and asked them the 5 economic questions selected by the model. #Data set 'Pts' contains the new patients' responses to these five questions. #We now want to know which economic cluster each patient belongs in. data(Pts) data(Medoids) data(Pop) data(PopClusters) Pt_clust<-EC_patient(Pts, Medoids, Pop, PopClusters) #number of patients per cluster: table(Pt_clust) #We now have a vector of patient cluster membership
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.