Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Descriptive Statistics and Distribution Functions in Eviews, Lecture notes of Descriptive statistics

These functions compute descriptive statistics for a specified sample, excluding missing values if necessary. The default sample is the current workfile ...

Typology: Lecture notes

2021/2022

Uploaded on 09/27/2022

raimond
raimond 🇬🇧

4.8

(8)

216 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Descriptive Statistics and Distribution Functions in Eviews
Descriptive Statistics
These functions compute descriptive statistics for a specified sample, excluding missing
values if necessary. The default sample is the current workfile sample. If you are
performing these computations on a series and placing the results into a series, you can
specify a sample as the last argument of the descriptive statistic function, either as a
string (in double quotes) or using the name of a sample object. For example:
series z = @mean(x, "1945m01 1979m12")
or
w = @var(y, s2)
where S2 is the name of a sample object and W and X are series. Note that you may not
use a sample argument if the results are assigned into a matrix, vector, or scalar object.
For example, the following assignment:
vector(2) a
series x
a(1) = @mean(x, "1945m01 1979m12")
is not valid since the target A(1) is a vector element. To perform this latter computation,
you must explicitly set the global sample prior to performing the calculation performing
the assignment:
smpl 1945:01 1979:12
a(1) = @mean(x)
To determine the number of observations available for a given series, use the
@obs
function. Note that where appropriate, EViews will perform casewise exclusion of data
with missing values. For example,
@cov(x,y)
and
@cor(x,y)
will use only observations
for which data on both X and Y are valid.
In the following table, arguments in square brackets [ ] are optional arguments:
[s]: sample expression in double quotes or name of a sample object. The optional
sample argument may only be used if the result is assigned to a series. For
pf3
pf4
pf5

Partial preview of the text

Download Descriptive Statistics and Distribution Functions in Eviews and more Lecture notes Descriptive statistics in PDF only on Docsity!

Descriptive Statistics and Distribution Functions in Eviews

Descriptive Statistics

These functions compute descriptive statistics for a specified sample, excluding missingvalues if necessary. The default sample is the current workfile sample. If you are performing these computations on a series and placing the results into a series, you can specify a sample as the last argument of the descriptive statistic function, either as astring (in double quotes) or using the name of a sample object. For example:

series z = @mean(x, "1945m01 1979m12") or w = @var(y, s2) where S2 is the name of a sample object and W and X are series. Note that you may notuse a sample argument if the results are assigned into a matrix, vector, or scalar object. For example, the following assignment: vector(2) a series x a(1) = @mean(x, "1945m01 1979m12") is not valid since the target A(1) is a vector element. To perform this latter computation,you must explicitly set the global sample prior to performing the calculation performing the assignment: smpl 1945:01 1979: a(1) = @mean(x) To determine the number of observations available for a given series, use the function. Note that where appropriate, EViews will perform casewise exclusion of data @obs with missing values. For example, @cov(x,y) and @cor(x,y) will use only observations for which data on both X and Y are valid. In the following table, arguments in square brackets [ ] are optional arguments:

  • [s]: sample expression in double quotes or name of a sample object. sample argument may only be used if the result is assigned to a series The optional. For

@quantileoptional sample argument., you must provide the method option argument in order to include the If the desired sample expression contains the double quote character, it may be entered using the double quote as an escape character. Thus, if you wish to use the equivalent of, smpl if name = "Smith" in your @MEAN function, you should enter the sample condition as: series y = @mean(x, "if name=""Smith""") The pairs of double quotes in the sample expression are treated as a single double quote.

Function Name Description @cor(x,y[,s]) correlation the correlation between X and Y. @cov(x,y[,s]) covariance the covariance between X and Y (division by ). @covp(x,y[,s]) population covariance

the covariance between X and Y (division by ). @covs(x,y[,s]) sample covariance the covariance between X and Y (division by ).

@inner(x,y[,s]) inner product the inner product of X and Y.

@obs(x[,s]) number of observations the number of non-missing observations for X in the current sample. @nas(x[,s]) number of NAs

the number of missing observations for X in the current sample.

@mean(x[,s]) mean average of the values in X. @median(x[,s]) median computes the median of the X (uses the average of middle two observations if the number of observations is even). @min(x[,s]) minimum minimum of the values in X. @max(x[,s]) maximum maximum of the values in X.

@sum(x[,s]) sum the sum of X. @prod(x[,s]) product the product of X (note this function could be subject to numerical overflows).

@sumsq(x[,s]) sum-of- squares sum of the squares of X.

@gmean(x[,s]) geometric mean

the geometric mean of X.

Statistical Distribution Functions

The following functions provide access to the density or probability functions, cumulative distribution, quantile functions, and random number generators for a numberof standard statistical distributions. There are four functions associated with each distribution. The first character of each function name identifies the type of function:

Function Type Beginning of Name Cumulative distribution (CDF) @c Density or probability @d Quantile (inverse CDF) @q Random number generator @r

The remainder of the function name identifies the distribution. For example, the functions for the beta distribution are @cbeta, @dbeta, @qbeta and @rbeta. When used with series arguments, EViews will evaluate the function for each observation in the current sample. As with other functions, NA or invalid inputs will yield NA values.For values outside of the support, the functions will return zero.

Note that the CDFs are assumed to be right-continuous:functions will return the smallest value where the CDF evaluated at the value equals or. The quantile exceeds the probability of interest:only relevant for discrete distributions. , where. The inequalities are The information provided below should be sufficient to identify the meaning of theparameters for each distribution.

Distribution Functions Density/Probability Function Beta @cbeta(x,a,b), @dbeta(x,a,b), @qbeta(p,a,b), @rbeta(a,b)^ for is the^ @beta and forfunction.^ , where Binomial @cbinom(x,n,p), @dbinom(x,n,p), @qbinom(s,n,p), @rbinom(n,p)^ if for^. , and 0 otherwise,

Chi-square @cchisq(x,v), @dchisq(x,v), @qchisq(p,v), @rchisq(v) where degrees of freedom parameter , and. Note that the need not be an integer. Exponential @cexp(x,m), @dexp(x,m), @qexp(p,m), @rexp(m)

for , and.

Extreme Value (Type I- minimum)

@cextreme(x), @dextreme(x), @qextreme(p), @cloglog(p), @rextreme

for.

F distribution- @cfdist(x,v1,v2), @dfdist(x,v1,v2), @qfdist(p,v1,v2), @rfdist(v1,v1) where the functions allow for fractional , and. Note that degrees of freedom parameters and . Gamma @cgamma(x,b,r), @dgamma(x,b,r), @qgamma(p,b,r), @rgamma(b,r)^ where^ , and^.

Generalized Error @cged(x,r), @dged(x,r), @qged(p,r), @rged(r) where , and.

@rweib(m,a)

Additional Distribution Related Functions

The following utility functions were designed to facilitate the computation ofcommon statistical tests. While these results may be derived using the distributional p -values for functions above, they are retained for convenience and backward compatibility.

Function Distribution Description @chisq(x,v) Chi-square Returns the probability that a Chi-squared statistic with degrees of freedom exceeds : @chisq(x,v)=1-@cchisq(x,d) @fdist(x,v1,v2) F -distribution Probability that an F -statistic with numerator degrees of freedom and denominator degrees of freedom exceeds @fdist(x,v1,v2)=1- : @cfdist(x,v1,v2) @tdist(x,v) t -distribution Probability that a t -statistic with in absolute value (two-sided^ degrees of freedom exceeds p - value): @tdist(x,v)=2*(1- @ctdist(@abs(x),v))