Estimates linear functions of one or more 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 |
COEFFICIENTS = scalar |
Linear coefficients for the random variables in the function; no default – must be set |
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 NEWESTIMATES |
Description
FNLINEAR
estimates linear functions of one or more random variables. The estimated values of the random variables, from which the function value 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 linear coefficients for the function are supplied (again in a variate) by the COEFFICIENTS
, and the constant is supplied (in a scalar) by the CONSTANTVALUE
option. So the function value is given by
SUM(ESTIMATES * COEFFICIENTS) + CONSTANTVALUE
The value 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 value inserted at the end. The corresponding variance-covariance matrix can be saved (in a symmetric matrix) by the NEWVCOVARIANCE
parameter.
Options: PRINT
, CONSTANTVALUE
, COEFFICIENTS
.
Parameters: ESTIMATES
, VCOVARIANCE
, FUNCTIONESTIMATE
, SE
, NEWESTIMATES
, NEWVCOVARIANCE
.
Method
The linear function w of the random variables f, g, h etc. is defined by the expression:
w = a0 + a1 × f + a2 × g + a3 × h + …
where a0, a1, a2 etc. are (known) coefficients. The estimated means and variances of the random variables, supplied by the ESTIMATES
and VCOVARIANCE
parameter, are used to calculate the estimated value of the function w and to calculate its variance. If the original random variables are Normally distributed, the random variable w is also Normally distributed and the variance calculation is exact.
Action with RESTRICT
Any restrictions are ignored.
See also
Procedures: FNCORRELATION
, FNPOWER
.
Commands for: Calculations and manipulation.
Example
CAPTION 'FNLINEAR example'; STYLE=meta 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 FNLINEAR [PRINT=summary; CONSTANTVALUE=2; COEFFICIENTS=!(1,2,0)]\ ESTIMATES=means; VCOVARIANCE=vcov; FUNCTIONESTIMATE=est; SE=se;\ NEWESTIMATES=newmeans; NEWVCOVARIANCE=newvcov PRINT est,se & newmeans,newvcov