summary_stat: Returns summary statistics of Financial variables

View source: R/summary_stat.R

summary_statR Documentation

Returns summary statistics of Financial variables

Description

The function allows to obtain summary statistics for financial variables. Mean and standard deviation are computed by default. If requested spatial autocorrelation is computed through the Moran test.

Usage

summary_stat(
data,
corr = FALSE,
variable,
d1,
d2,
plot = FALSE)

Arguments

data

Dataset of class 'data.frame'. Specify the dataset obtained from the retrieving and the merge_data functions.

corr

Logical. By default set to FALSE. If spatial autocorrelation is of interest set to TRUE. To compute the spatial autocorrelation point geometries are required.

variable

Character. Specify the name of the variable for which to obtain the spatial autocorrelation.

d1

See dnearneigh function for details.

d2

See dnearneigh function for details.

plot

Logical. By default set to FALSE. If Moran plot for spatial autocorrelation is of interest set the argument to TRUE.

Value

A list with class list containing the following components:

variable

the names of the financial variables

mean

the value of the mean for each financial variable

sd

the value of the standard deviation for each financial variables

moran.test

list containing the results of the moran.test function

Author(s)

Lorena Ricciotti

References

Moran, Patrick AP (1950). "A test for the serial independence of residuals." Biometrika, 37(1/2), 178–181. JSTOR.


PublicWorksFinanceIT documentation built on April 3, 2025, 6:11 p.m.