Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-02 - 43,50145/misr.doc
There are 2 other files named misr.doc in the archive. Click here to see a list.
SUBROUTINE MISR

PURPOSE
   COMPUTE MEANS, STANDARD DEVIATIONS, SKEWNESS AND KURTOSIS,
   CORRELATION COEFFICIENTS, REGRESSION COEFFICIENTS, AND
   STANDARD ERRORS OF REGRESSION COEFFICIENTS WHEN THERE ARE
   MISSING DATA POINTS.  THE USER IDENTIFIES THE MISSING DATA
   BY MEANS OF A NUMERIC CODE.	THOSE VALUES HAVING THIS CODE
   ARE SKIPPED IN COMPUTING THE STATISTICS.  IN THE CASE OF THE
   CORRELATION COEFFICIENTS, ANY PAIR OF VALUES ARE SKIPPED IF
   EITHER ONE OF THEM ARE MISSING.

USAGE
   CALL MISR (NO,M,X,CODE,XBAR,STD,SKEW,CURT,R,N,A,B,S,IER)

DESCRIPTION OF PARAMETERS
   NO	- NUMBER OF OBSERVATIONS
   M	- NUMBER OF VARIABLES
   X	- INPUT DATA MATRIX OF SIZE NO X M.
   CODE - INPUT VECTOR OF LENGTH M, WHICH CONTAINS A NUMERIC
	  MISSING DATA CODE FOR EACH VARIABLE. ANY OBSERVATION
	  FOR A GIVEN VARIABLE HAVING A VALUE EQUAL TO THE CODE
	  WILL BE DROPPED FOR THE COMPUTATIONS.
   XBAR - OUTPUT VECTOR OF LENGTH M CONTAINING MEANS
   STD	- OUTPUT VECTOR OF LENGTH M CONTAINING STANDARD DEVI-
	  ATIONS
   SKEW - OUTPUT VECTOR OF LENGTH M CONTAINING SKEWNESS
   CURT - OUTPUT VECTOR OF LENGTH M CONTAINING KURTOSIS
   R	- OUTPUT MATRIX OF PRODUCT-MOMENT CORRELATION
	  COEFFICIENTS.  THIS WILL BE THE UPPER TRIANGULAR
	  MATRIX ONLY, SINCE THE M X M MATRIX OF COEFFICIENTS
	  IS SYMMETRIC. (STORAGE MODE 1)
   N	- OUTPUT MATRIX OF NUMBER OF PAIRS OF OBSERVATIONS USED
	  IN COMPUTING THE CORRELATION COEFFICIENTS.  ONLY THE
	  UPPER TRIANGULAR PORTION OF THE MATRIX IS GIVEN.
	  (STORAGE MODE 1)
   A	- OUTPUT MATRIX (M BY M)  CONTAINING INTERCEPTS OF
	  REGRESSION LINES (A) OF THE FORM Y=A+BX.  THE FIRST
	  SUBSCRIPT OF THIS MATRIX REFERS TO THE INDEPENDENT
	  VARIABLE AND THE SECOND TO THE DEPENDENT VARIABLE.
	  FOR EXAMPLE, A(1,3) CONTAINS THE INTERCEPT OF THE
	  REGRESSION LINE FOR TWO VARIABLES WHERE VARIABLE 1
	  IS INDEPENDENT AND VARIABLE 3 IS DEPENDENT.  NOTE
	  THAT MATRIX A IS STORED IN A VECTOR FORM.
   B	- OUTPUT MATRIX (M BY M)  CONTAINING REGRESSION
	  COEFFICIENTS (B) CORRESPONDING TO THE VALUES OF
	  INTERCEPTS CONTAINED IN THE OUTPUT MATRIX A.
   S	- OUTPUT MATRIX (M BY M)  CONTAINING STANDARD ERRORS
	  OF REGRESSION COEFFICIENTS CORRESPONDING TO THE
	  COEFFICIENTS CONTAINED IN THE OUTPUT MATRIX B.
   IER	- 0, NO ERROR.
	  1, IF NUMBER OF NON-MISSING DATA ELEMENTS FOR J-TH
	     VARIABLE IS TWO OR LESS.  IN THIS CASE, STD(J),
	     SKEW(J), AND CURT(J) ARE SET TO 10**75.  ALL
	     VALUES OF R, A, B, AND S RELATED TO THIS VARIABLE
	     ARE ALSO SET TO 10**75.
	  2, IF VARIANCE OF J-TH VARIABLE IS LESS THAN
	     10**(-20).  IN THIS CASE, STD(J), SKEW(J), AND
	     CURT(J) ARE SET TO 10**75.  ALL VALUES OF R, A,
	     B, AND S RELATED TO THIS VARIABLE ARE ALSO SET TO
	     10**75.

REMARKS
   THIS SUBROUTINE CANNOT DISTINGUISH A BLANK AND A ZERO.
   THEREFORE, IF A BLANK IS SPECIFIED AS A MISSING DATA CODE IN
   INPUT CARDS, IT WILL BE TREATED AS 0 (ZERO).

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   NONE

METHOD
   LEAST SQUARES REGRESSION LINES AND PRODUCT-MOMENT CORRE-
   LATION COEFFICIENTS ARE COMPUTED.