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 |
Ecuador's amount of Assets and Liabilities Operations of the National Financial System: https://contenido.bce.fin.ec/home1/economia/tasas/IndiceSFN.htm
actpas
actpas
A dataframe containing 358 observations and 25 columns.
Morales-Oñate, V., and Morales-Oñate, B. (2024). Cluster Evolution Analytics. https://mpra.ub.uni-muenchen.de/120220/
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.
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,...)
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,...)
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. |
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
.
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 |
ECkTot |
all clusters that |
Clus |
dataframe objects, cluster and time. |
sumdat |
summary statistics of |
kmodelSol |
output of clustering algorithm in each iteration. |
clusterStats |
cluster statistics in each clustering. |
sl |
evolution in time with |
sel |
input variable names of objects in time. |
sel.obj |
input chatarcher of selected object. |
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/
Morales-Oñate, V., and Morales-Oñate, B. (2024). Cluster Evolution Analytics. https://mpra.ub.uni-muenchen.de/120220/
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)
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 density or empirical cumulative distribution from Bvals
in clusEvol output
.
## S3 method for class 'clusEvol' plot(x,target,type = "heat",plotly=FALSE,...)
## S3 method for class 'clusEvol' plot(x,target,type = "heat",plotly=FALSE,...)
x |
an object of the class |
target |
Numeric; 1 if density, 2 if ecdf plot is returned |
type |
Character; |
plotly |
Logical; if |
... |
other arguments to be passed to the function
|
This function plots outputs from clusEvol taking into account its panel data structure.
Produces a plot. No values are returned.
clusEvol
for procedure and examples.
Relative levels of income, output, input, and productivity for 183 countries between 1950 and 2019 (base year: 2017).
pwt1001
pwt1001
A data frame with 12,810 observations of 52 variables.
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.
Morales-Oñate, V., and Morales-Oñate, B. (2024). Cluster Evolution Analytics. https://mpra.ub.uni-muenchen.de/120220/