Package 'clusEvol'

Title: A Procedure for Cluster Evolution Analytics
Description: Cluster Evolution Analytics allows us to use exploratory what if questions in the sense that the present information of an object is plugged-in a dataset in a previous time frame so that we can explore its evolution (and of its neighbors) to the present. See the URL for the papers associated with this package, as for instance, Morales-Oñate and Morales-Oñate (2024) <https://mpra.ub.uni-muenchen.de/120220>.
Authors: Víctor Morales-Oñate [aut, cre] , Bolívar Morales-Oñate [aut]
Maintainer: Víctor Morales-Oñate <[email protected]>
License: GPL (>= 3)
Version: 1.0.0
Built: 2024-11-15 22:16:13 UTC
Source: https://github.com/vmoprojs/clusevol

Help Index


Assets and liabilities operations

Description

Ecuador's amount of Assets and Liabilities Operations of the National Financial System: https://contenido.bce.fin.ec/home1/economia/tasas/IndiceSFN.htm

Usage

actpas

Format

A dataframe containing 358 observations and 25 columns.

References

Morales-Oñate, V., and Morales-Oñate, B. (2024). Cluster Evolution Analytics. https://mpra.ub.uni-muenchen.de/120220/


clusEvol

Description

clusEvol is a function that allows us to use exploratory what if questions in the sense that the present information of an object is plugged-in a dataset in a previous time frame so that we can explore its evolution (and of its neighbours) to the present.

Usage

clusEvol(x=NULL,objects=NULL, time = NULL,target.vars = NULL,
                      time.base=NULL,sel.obj=NULL,init = NULL,logscale = FALSE,
                      ng = NULL,clm = "pam",scale=TRUE,clstats = FALSE,...)

Arguments

x

Dataframe. panel data input.

objects

Character; variable name of objects.

time

Character; variable name of time .

target.vars

Character; selected variables for Cluster Evolution Analytics (CEA).

time.base

Numeric; selected time for CEA.

sel.obj

Character; selected object for CEA.

init

Numeric; initiation time.

logscale

Logical; TRUE if data should be logscaled.

ng

Numeric; number of desired clusters.

clm

Character; (pam,kmeans,choose).

scale

Logical; TRUE if data is scaled in clm.

clstats

Logical; TRUE if cluster statistics should be returned.

...

Parameters used in 'clm' method.

Details

clusEvol can be synthetized has the following steps

- Identify clusters to which sel.obj is similar in time.base - The data of sel.obj in time.base is plugged-in in each time period. - Clusters are generated in each time period with data from sel.obj in time.base.

Value

Returns an object of class clusEvol. An object of class clusEvol is a list containing at most the following components:

datos

clean input data;

target.vars

selected variables;

results

data frame of negighbours of sel.obj;

ECk

clusters that sel.obj belongs to;

ECkTot

all clusters that sel.obj belongs to;

Clus

dataframe objects, cluster and time.

sumdat

summary statistics of datos.

kmodelSol

output of clustering algorithm in each iteration.

clusterStats

cluster statistics in each clustering.

sl

evolution in time with target.vars included (subset of Clus but only for sel.obj).

sel

input variable names of objects in time.

sel.obj

input chatarcher of selected object.

Author(s)

Víctor Morales Oñate, [email protected], https://sites.google.com/site/moralesonatevictor/,https://www.linkedin.com/in/vmoralesonate/ Bolívar Morales Oñate, [email protected], https://sites.google.com/site/moralesonatevictor/

References

Morales-Oñate, V., and Morales-Oñate, B. (2024). Cluster Evolution Analytics. https://mpra.ub.uni-muenchen.de/120220/

Examples

library(clusEvol)
data(actpas)

solclusEvol <- clusEvol(x=actpas,objects="razon_social", 
time = "fecha",target.vars = c("montoAct","operAct"),
                        time.base=max(actpas$fecha),
                        sel.obj="BANCO SOLIDARIO S.A.",init = min(actpas$fecha),
                        logscale = TRUE,ng = 5,clm = "pam")
print(solclusEvol)

Plot output results from clusEvol

Description

Plot density or empirical cumulative distribution from Bvals in clusEvol output.

Usage

## S3 method for class 'clusEvol'
plot(x,target,type = "heat",plotly=FALSE,...)

Arguments

x

an object of the class "clusEvol"

target

Numeric; 1 if density, 2 if ecdf plot is returned

type

Character; heat (default), line, boxplot are the options

plotly

Logical; if FALSE, a ggplotly plot is returned

...

other arguments to be passed to the function ggplot

Details

This function plots outputs from clusEvol taking into account its panel data structure.

Value

Produces a plot. No values are returned.

See Also

clusEvol for procedure and examples.


Penn World Table (Version 10.01)

Description

Relative levels of income, output, input, and productivity for 183 countries between 1950 and 2019 (base year: 2017).

Usage

pwt1001

Format

A data frame with 12,810 observations of 52 variables.

Details

The Penn World Table 10.01 (<https://www.rug.nl/ggdc/productivity/pwt/>) provides information on relative levels of income, output, input, and productivity for 183 countries between 1950 and 2019.

References

Morales-Oñate, V., and Morales-Oñate, B. (2024). Cluster Evolution Analytics. https://mpra.ub.uni-muenchen.de/120220/