Estimates products of powers of two random variables, and calculates their variances and covariances (S.A. Gezan).
Options
PRINT = string token |
Output required (summary ); default summ |
---|---|
CONSTANTVALUE = scalar |
Constant value for the function; default 0 |
POWERS = variate |
Specifies the powers of the two random variables |
INDEXES = variate |
Specifies the locations of the random variables corresponding to the elements of the POWERS variate |
CORRECTION = string token |
Whether to apply an additional correction to the variance of a product, using terms from the second-order approximation; default no |
Parameters
ESTIMATES = variates |
Estimated values of the random variables |
---|---|
VCOVARIANCE = symmetric matrices |
Variance-covariance matrix of the random variable estimates |
FUNCTIONESTIMATE = scalars |
Saves the estimated value of the function |
SE = scalars |
Saves the standard error of the function estimate |
NEWESTIMATES = variates |
Saves new vectors of estimates, including the estimated value of the function |
NEWVCOVARIANCE = symmetric matrices |
Saves variance-covariance matrices for the new vestors (including the function estimate) |
Description
FNPOWER
estimates products of powers of two random variables. The estimated values of the random variables, from which the function estimate is calculated, are supplied (in a variate) by the ESTIMATES
parameter. Their variances and covariances are supplied (in a symmetric matrix) by the VCOVARIANCE
parameter. The positions of the random variables in the ESTIMATES
variate are specified by the INDEXES
option, and their powers are specified by the POWERS
option (both in variates of length two).
The estimate can be saved by the FUNCTIONESTIMATE
parameter, and its standard error can be saved by the SE
option (both in scalars). The NEWESTIMATES
parameter can save a new variate of estimates, containing the original ESTIMATES
variate and then the function estimate inserted at the end. The corresponding variance-covariance matrix can be saved (in a symmetric matrix) by the NEWVCOVARIANCE
parameter.
The variance and covariances are calculated using a first-order Taylor expension. You can obtain a more accurate value for the variance of an ordinary product by setting option CORRECTION=yes
. (FNPOWER
then uses a second-order Taylor expansion.)
Options: PRINT
, CONSTANTVALUE
, POWERS
, INDEXES
, CORRECTION
.
Parameters: ESTIMATES
, VCOVARIANCE
, FUNCTIONESTIMATE
, SE
, NEWESTIMATES
, NEWVCOVARIANCE
.
Method
The power function w, of the random variables f and g, is defined by the expression:
w = fp × gq
for the real-valued coefficients p and q (defined by the POWERS
parameter). The functions that can be defined thus include:
single power | w = fp (i.e. q = 0), |
---|---|
square root | w = √f (i.e. p = 0.5, q = 0), |
product | w = f × g (i.e. p = q = 1), |
ratio | w = f / g (i.e. p = q = -1). |
The variances and covariances of the function are approximated using a first-order Taylor series expansion (i.e. the delta method); see Kendall & Stuart (1963). For example the expressions for the variance of the product and ratio functions are as follows:
product | var(w) = var(f × g) |
---|---|
= E(f)2 × var(g) + E(g)2 × var(f) + 2 × E(f) × E(g) × cov(f,g) | |
ratio | var(w) = var(f / g) |
= (1 / E(g)2) × { var(f) – 2 × E(w) × cov(f,g) + E(w)2 × var(g) } |
The quality of this approximation depends on the linearity of the function near the estimate. For a product, you can request an additional correction for the product function based on a second-order Taylor expansion. A correction factor cf is then added to the expression above, where
cf = var(f) × var(g) + cov(f,g)2.
Reference
Kendall, M. & Stuart, A. (1963). The Advanced Theory of Statistics, Volume 1. Griffin, London.
See also
Procedures: FNCORRELATION
, FNLINEAR
.
Commands for: Calculations and manipulation.
Example
CAPTION 'FNPOWER example'; STYLE=meta " Reading data" VARIATE [VALUES=4.01,19.63,13.65] means SYMMETRICMATRIX [ROWS=3; VALUES=150.40,-31.85,161.13,0.93,-9.32,23.31] vcov PRINT means,vcov FNPOWER [PRINT=summary; CONSTANTVALUE=0; POWERS=!(1,-1); INDEXES=!(1,3)]\ ESTIMATES=means; VCOVARIANCE=vcov; FUNCTIONESTIMATE=est;\ SE=se; NEWESTIMATES=newmeans; NEWVCOVARIANCE=newvcov PRINT est,se & newmeans,newvcov FNPOWER [PRINT=summary; CONSTANTVALUE=0; POWERS=!(1,-1); INDEXES=!(1,3);\ CORRECTION=yes] ESTIMATES=means; VCOVARIANCE=vcov;\ FUNCTIONESTIMATE=est; SE=se;\ NEWESTIMATES=newmeans; NEWVCOVARIANCE=newvcov PRINT est,se & newmeans,newvcov