1. Home
  2. VFUNCTION procedure

VFUNCTION procedure

Calculates functions of variance components from a REML analysis (S.J. Welham).

Options

PRINT = string token Output required (function); default func
RANDOM = formula Random model (excluding residual stratum) used for the REML analysis
NCONSTANT = scalar Value to be used as constant in the numerator function; default 0
DCONSTANT = scalar Value to be used as constant in the denominator function; default 0
SAVE = REML save structure Specifies the (REML) save structure from which the variance components are to be taken; by default they are taken from the save structure of the most recent REML analysis

Parameters

NUMERATOR = variates Each variate contains a list of coefficients, one for each variance component, defining a linear combination of the components to use as the numerator of the function
DENOMINATOR = variates Each variate contains coefficients defining a linear combination of the variance components to use as the denominator of the function
FUNCTIONVALUE = scalars Saves the calculated value of the function
SE = scalars Saves the approximate standard error of the function value

Description

VFUNCTION calculates linear combinations, reciprocals of linear combinations, or ratios of linear combinations of the estimates of variance components from a REML analysis. The approximate standard errors of the functions are also produced.

The estimated variance components are taken from the structure specified by the SAVE option. If this option is not set, the SAVE structure from the most recent REML analysis is used. The RANDOM option must be set to the random formula used by the REML analysis, but excluding the residual term.

The NUMERATOR parameter supplies a variate that defines the coefficient to use as a multiplier for each variance component in the linear combination of components that forms the numerator of the function. The order of the components is as given by the RANDOM option, with the residual term added at the end. If the variate contains fewer values than the number of components, the final coefficients are taken to be zero. However, random components that were constrained to be fixed in the REML analysis are ignored. The DENOMINATOR parameter similarly defines the linear combination of components in the denominator of the function. If only NUMERATOR is set the function will be linear; conversely if only DENOMINATOR is set it will be a reciprocal function, and if both NUMERATOR and DENOMINATOR are set the function will be the ratio of two linear functions. Options NCONSTANT and DCONSTANT allow a constant to be included in the numerator and denominator functions, respectively.

Printed output is controlled by the option PRINT; by default the calculated value of the function and its approximate standard error are printed. Parameters FUNCTIONVALUE and SE allow the function value and standard error to be saved.

Options: PRINT, RANDOM, NCONSTANT, DCONSTANT, SAVE.

Parameters: NUMERATOR, DENOMINATOR, FUNCTIONVALUE, SE.

Method

The components and their variance-covariance matrix are retrieved using VKEEP. The function is calculated as specified and its approximate standard error is calculated using a formula derived from a Taylor expansion (see, for example, Kendall & Stuart 1963, page 232):

se( f/g ) = (1/g) × √{ var(f) – 2 × (f/g) × cov(f,g) + (f/g) × (f/g) × var(g) }

Reference

Kendall, M. & Stuart, A. (1963). The Advanced Theory of Statistics, Volume 1. Griffin, London.

See also

Directive: VCOMPONENTS.

Commands for: REML analysis of linear mixed models.

Example

CAPTION 'VFUNCTION example',\ 
        !t('5 x 5 Lattice design, data from Cochran & Cox',\ 
        '(1957), Experimental Designs, p. 406.'); STYLE=meta,plain
UNITS   [50]
FACTOR  [LEVELS=2; VALUES=25(1,2)] Reps
 &      [LEVELS=10; VALUES=5(1...10)] Blocks
 &      [LEVELS=25; VALUES=1...25,1,6...21,2,7...22,3,8...23,4,9...24,\ 
        5,10...25] Treats
VARIATE Yield
READ Yield
   6.   7.   5.   8.   6.  16.  12.  12.  13.   8.
  17.   7.   7.   9.  14.  18.  16.  13.  13.  14.
  14.  15.  11.  14.  14.  24.  13.  24.  11.   8.
  21.  11.  14.  11.  23.  16.   4.  12.  12.  12.
  17.  10.  30.   9.  23.  15.  15.  22.  16.  19.
  :
VCOMPONENTS [FIXED=Treats] RANDOM=Reps+Blocks
REML        Yield
VFUNCTION   [RANDOM=Reps+Blocks] NUMERATOR=!(25,5,1),!(0,2.5,1);\  
            FUNCTION=F[1,2]; SE=SE[1,2]
PRINT       F[1],SE[1] & F[2],SE[2]
VFUNCTION   [RANDOM=Reps+Blocks; DCONSTANT=5] DENOMINATOR=!(4,10)
&           [DCONSTANT=0] NUMERATOR=!(25,5,1); DENOMINATOR=!(0,2.5,1)
Updated on March 4, 2019

Was this article helpful?