Estimates linear functions of one or more random variables, and calculates their variances and covariances (S.A. Gezan).
|Output required (
||Constant value for the function; default 0|
||Linear coefficients for the random variables in the function; no default – must be set|
||Estimated values of the random variables|
||Variance-covariance matrix of the random variable estimates|
||Saves the estimated value of the function|
||Saves the standard error of the function estimate|
||Saves new vectors of estimates, including the estimated value of the function|
||Saves variance-covariance matrices for the
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
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
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.
Any restrictions are ignored.
Commands for: Calculations and manipulation.
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