EC_time: Time Required to Run N Variable Combinations on N Cores

View source: R/EC_time.R

EC_timeR Documentation

Time Required to Run N Variable Combinations on N Cores

Description

Running the 'EconomicClusters' algorithm takes significant computing time. 'EC_time' determines the amount of time needed to run 'EconomicClusters' for one combination of variables on each available core in parallel. These results can be used to estimate the overall duration of the algorithm for all variable combinations.

Usage

EC_time(X, Y, nvars, kmin, kmax, ncores)

Arguments

X

a data frame with Column 1 containing weighted number of household members (coded as numeric) and Columns 2 through n containing all asset variables to be considered for variable selection (coded as factors). A data frame in this form can be produced by function 'EC_DHSwts' for DHS data. Column names should be specified.

Y

optional variable in vector form to be included in all variable combinations. See details below.

nvars

number of asset variables used to define economic clusters. If Y is not missing, the number of asset variables used to define economic clusters will be nvars+1.

kmin

minimum number of clusters to be considered

kmax

maximum number of clusters to be considered

ncores

number of computing cores to be used in parallel

Value

Estimated number of hours needed to run 'EconomicClusters' with your stated parameters.

Note

Running the full 'EconomicClusters' algorithm on a real household survey data set will take a significant amount of computing time. Don't worry! We have a free and publically available solution for you. Please see the help files for 'EconomicClusters-package' for further details.

Author(s)

Lauren Eyler economic.clusters@gmail.com

See Also

EconomicClusters-package, EconomicClusters, EC_DHSwts, data_for_EC

Examples

#We want to know how much computing time we need to run 'EconomicClusters' on our data set 
#to select 5 variables with cluster numbers ranging from 5 to 10.
#Our computer has 2 cores that we can devote to running the algorithm.

data(data_for_EC)
EC_time(data_for_EC, nvars=5, kmin=5, kmax=10, ncores=2)

#You can estimate that it will take 0.0037 hours
#to run the full 'EconomicClusters' algorithm on this dataset.
#Note: To run this analysis on a full household survey data set will take much longer. 
#Don't worry! We have a free and publically available solution for you.
#Please see the help file for 'EconomicClusters-package' to find out more.


Lauren-Eyler/EconomicClusters documentation built on March 22, 2022, 1:21 a.m.