com.kutsyy.lvspod
Class OrdinalSpatialAbstract

java.lang.Object
  |
  +--com.kutsyy.lvspod.OrdinalSpatialAbstract
All Implemented Interfaces:
Function, MvFunction
Direct Known Subclasses:
OrdinalSpatial, OrdinalSpatialAbstractEM, OrdinalSpatialAbstractSample, OrdinalSpatialAbstractSubstitution, OrdinalSpatialCLTrueX, OrdinalSpatialCLTrueXPLE, OrdinalSpatialExA, OrdinalSpatialMultiThreadAbstract, OrdinalSpatialQL, OrdinalSpatialSingleAveregeQL

abstract class OrdinalSpatialAbstract
extends Object
implements Function, MvFunction

Insert the type's description here. Created by Vadim Kutsyy

Author:
Vadim Kutsyy

Field Summary
 double[] beta
          estimated value of beta
protected  double[] betaKeep
          used internaly for keeping old beta
protected  brent Brent
          used internaly for calculation of maximum
protected  double EPS
          Relative error of maximizaton
protected  boolean gradient
          internaly identified if gradient is implemented
 int itotal
          total number of call s to lL() during given maximization
protected  int K
          numer of covarites
protected  boolean[] keepConstant
          correlation coeffitient
protected  int L
          number of leveles
(package private)  double[] lambda
          Description of the Field
protected  SpatialPoint[] Loc
          Keep infoemation about neighborhood structure
protected  double[][] M
          used internaly for calculating Sigma[][] during simulation
protected  int max_over
          Identified over which parameters to maximize 0 - over all 1 - over all but phi 2 - over all but beta 3 - over theta only
protected  mnbrak Mnbrak
           
protected  int N
          number of data points
protected  int[][] NeighborDefinition
          definition of the neighborhood by default it is nearest neighbor"
protected  double[] p
          Used internaly as point for maximization
 double phi
          Description of the Field
 double PHI_LIMIT
          identified maximum and minimum for maximuzation over Phi Can be change prier to MLE
protected  double phiKeep
          used internaly for keeping old value of Phi
 double phiVar
          Description of the Field
protected  powell Powell
          used internaly for multivariate maximization
 MersenneTwister rnd
          Description of the Field
protected  double[][] Sigma
          Description of the Field
protected  double[][] sqrtSigma
          used internaly, square rot of Sigma, used for simulations.
 double[] theta
          estimated cut off points
 double THETA_BETWEEN
          Description of the Field
 double THETA_LIMIT
          Description of the Field
protected  double[] thetaKeep
          used internaly for keeping old value of theta
protected  double[] thetal
          used for internal computations, keeping value of lower limit for the neighborhood
protected  double[] thetaL
          used for internal computations, keeping value of lower limit for all points
protected  double[] thetau
          used for internal computations, keeping value of upper limit for the neighborhood
protected  double[] thetaU
          used for internal computations, keeping value of upper limit for all points
protected  boolean TimeSeries
          identified if particular field is a time series Simulations are done differently
protected  double[] TrueBeta
          Keep true value of beta, used for simulations only
protected  double TruePhi
          True Value of phi, used only when data is generated
protected  double[] TrueTheta
          True Value of theta, used only when data is generated
 double[] TrueX
          True Value of X, used only when data is generated
 double[][] W
          Variance matrix, used for simulations
protected  double[] x
          used internaly for any double arrays of length N
protected  double[][] xi
          used for multivariate maximization directions
protected  int[] xLoc
          x coordinated of the data in Y
protected  double[] xx
           
 int[] Y
          obesved data Y
protected  int[] yLoc
          y coordinated of the data in Y
protected  double[][] Z
          covariates matrix
 
Constructor Summary
OrdinalSpatialAbstract()
          Insert the method's description here.
OrdinalSpatialAbstract(int[] y)
          Insert the method's description here.
OrdinalSpatialAbstract(int[] y, double[][] z)
          Insert the method's description here.
OrdinalSpatialAbstract(int[] y, double Phi, double[] Theta, SpatialPoint[] loc, double[] Beta, double[][] z, int[][] neighborDefinition)
          put your documentation comment here
OrdinalSpatialAbstract(int[] y, int[] xLocation, int[] yLocation, double[][] z)
          Insert the method's description here.
OrdinalSpatialAbstract(int[] y, int[] xLocation, int[] yLocation, double[][] z, int[][] Neighborgood)
          Constructor for the OrdinalSpatialAbstract object
OrdinalSpatialAbstract(OrdinalSpatialAbstract T)
          Insert the method's description here.
 
Method Summary
 double[] beta()
          Description of the Method
protected  void createEigenvalues()
          Gets the Eigenvalues attribute of the OrdinalSpatialAbstract object
protected  void createLoc()
          Insert the method's description here.
protected  void createSigma(double Phi)
          Insert the method's description here.
protected  void createW()
          Description of the Method
protected  void define()
          put your documentation comment here
 void estimate()
           
 void estimate(double Phi)
           
 void estimate(double[] Theta)
           
 void estimate(double[] Theta, double[] Beta)
           
 void estimate(double Phi, double[] Theta)
          put your documentation comment here
 void estimate(double Phi, double[] Theta, double[] Beta)
           
 double f(double x)
          return value of the likelihood for value phi defined by x.
 double f(double[] x)
          put your documentation comment here
 void g(double[] x, double[] g)
          put your documentation comment here
protected  void grad(double[] g)
          Description of the Method
protected  void initializeL()
          Description of the Method
protected  double ll()
          Insert the method's description here.
 double lL()
          Insert the method's description here.
 double lL(double phi, double[] theta)
          Insert the method's description here.
 double lL(double phi, double[] theta, double[] beta)
          Insert the method's description here.
protected  double ll(int i)
          Description of the Method
protected  void makeThetaLU()
          Description of the Method
protected  double test(double Phi, double[] Beta)
          put your documentation comment here
 double testBeta(double[] Beta)
          put your documentation comment here
 double testPhi(double Phi)
          put your documentation comment here
 double testPhiBeta(double Phi, double[] Beta)
          put your documentation comment here
 void updateY(int[] y)
          put your documentation comment here
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

rnd

public MersenneTwister rnd
Description of the Field

phi

public double phi
Description of the Field

phiVar

public double phiVar
Description of the Field

theta

public double[] theta
estimated cut off points

beta

public double[] beta
estimated value of beta

Y

public int[] Y
obesved data Y

itotal

public int itotal
total number of call s to lL() during given maximization

THETA_LIMIT

public final double THETA_LIMIT
Description of the Field

PHI_LIMIT

public final double PHI_LIMIT
identified maximum and minimum for maximuzation over Phi Can be change prier to MLE

THETA_BETWEEN

public final double THETA_BETWEEN
Description of the Field

TrueX

public double[] TrueX
True Value of X, used only when data is generated

W

public double[][] W
Variance matrix, used for simulations

keepConstant

protected boolean[] keepConstant
correlation coeffitient

yLoc

protected int[] yLoc
y coordinated of the data in Y

xLoc

protected int[] xLoc
x coordinated of the data in Y

NeighborDefinition

protected int[][] NeighborDefinition
definition of the neighborhood by default it is nearest neighbor"

Z

protected double[][] Z
covariates matrix

TrueBeta

protected double[] TrueBeta
Keep true value of beta, used for simulations only

Sigma

protected double[][] Sigma
Description of the Field

EPS

protected final double EPS
Relative error of maximizaton

Loc

protected SpatialPoint[] Loc
Keep infoemation about neighborhood structure

K

protected int K
numer of covarites

N

protected int N
number of data points

L

protected int L
number of leveles

TrueTheta

protected double[] TrueTheta
True Value of theta, used only when data is generated

TruePhi

protected double TruePhi
True Value of phi, used only when data is generated

M

protected double[][] M
used internaly for calculating Sigma[][] during simulation

sqrtSigma

protected double[][] sqrtSigma
used internaly, square rot of Sigma, used for simulations.

max_over

protected int max_over
Identified over which parameters to maximize 0 - over all 1 - over all but phi 2 - over all but beta 3 - over theta only

TimeSeries

protected boolean TimeSeries
identified if particular field is a time series Simulations are done differently

betaKeep

protected double[] betaKeep
used internaly for keeping old beta

thetaKeep

protected double[] thetaKeep
used internaly for keeping old value of theta

thetal

protected double[] thetal
used for internal computations, keeping value of lower limit for the neighborhood

thetaL

protected double[] thetaL
used for internal computations, keeping value of lower limit for all points

thetau

protected double[] thetau
used for internal computations, keeping value of upper limit for the neighborhood

thetaU

protected double[] thetaU
used for internal computations, keeping value of upper limit for all points

phiKeep

protected double phiKeep
used internaly for keeping old value of Phi

x

protected double[] x
used internaly for any double arrays of length N

xx

protected double[] xx

Brent

protected brent Brent
used internaly for calculation of maximum

Powell

protected powell Powell
used internaly for multivariate maximization

Mnbrak

protected mnbrak Mnbrak

xi

protected double[][] xi
used for multivariate maximization directions

p

protected double[] p
Used internaly as point for maximization

gradient

protected boolean gradient
internaly identified if gradient is implemented

lambda

double[] lambda
Description of the Field
Constructor Detail

OrdinalSpatialAbstract

public OrdinalSpatialAbstract(int[] y)
Insert the method's description here.
Parameters:
y - int[]

OrdinalSpatialAbstract

public OrdinalSpatialAbstract(int[] y,
                              double[][] z)
Insert the method's description here.
Parameters:
y - int[]
z - double[][]

OrdinalSpatialAbstract

public OrdinalSpatialAbstract(OrdinalSpatialAbstract T)
Insert the method's description here.
Parameters:
T - Description of Parameter

OrdinalSpatialAbstract

public OrdinalSpatialAbstract(int[] y,
                              int[] xLocation,
                              int[] yLocation,
                              double[][] z,
                              int[][] Neighborgood)
Constructor for the OrdinalSpatialAbstract object
Parameters:
y - Description of Parameter
xLocation - Description of Parameter
yLocation - Description of Parameter
z - Description of Parameter
Neighborgood - Description of Parameter

OrdinalSpatialAbstract

public OrdinalSpatialAbstract()
Insert the method's description here.

OrdinalSpatialAbstract

public OrdinalSpatialAbstract(int[] y,
                              int[] xLocation,
                              int[] yLocation,
                              double[][] z)
Insert the method's description here.
Parameters:
y - Description of Parameter
xLocation - Description of Parameter
yLocation - Description of Parameter
z - Description of Parameter

OrdinalSpatialAbstract

public OrdinalSpatialAbstract(int[] y,
                              double Phi,
                              double[] Theta,
                              SpatialPoint[] loc,
                              double[] Beta,
                              double[][] z,
                              int[][] neighborDefinition)
put your documentation comment here
Parameters:
y - Description of Parameter
Phi - Description of Parameter
Theta - Description of Parameter
loc - Description of Parameter
Beta - Description of Parameter
z - Description of Parameter
neighborDefinition - Description of Parameter
Method Detail

f

public double f(double x)
return value of the likelihood for value phi defined by x. used by maximization only
Specified by:
f in interface Function
Parameters:
x - new value of phi
Returns:
lL(phi=x)

f

public double f(double[] x)
put your documentation comment here
Specified by:
f in interface MvFunction
Parameters:
x -  
Returns:
 

g

public void g(double[] x,
              double[] g)
       throws UnsupportedOperationException
put your documentation comment here
Specified by:
g in interface MvFunction
Parameters:
x -  
g - Description of Parameter
Throws:
UnsupportedOperationException - Description of Exception

updateY

public void updateY(int[] y)
put your documentation comment here
Parameters:
y -  

lL

public double lL()
Insert the method's description here.
Returns:
double

lL

public double lL(double phi,
                 double[] theta)
Insert the method's description here.
Parameters:
phi - double
theta - double[]
Returns:
double

estimate

public void estimate(double[] Theta)

estimate

public void estimate(double[] Theta,
                     double[] Beta)

estimate

public void estimate(double Phi)

estimate

public void estimate(double Phi,
                     double[] Theta)
put your documentation comment here
Parameters:
Phi -  
Theta -  

estimate

public void estimate(double Phi,
                     double[] Theta,
                     double[] Beta)

estimate

public void estimate()

lL

public double lL(double phi,
                 double[] theta,
                 double[] beta)
Insert the method's description here.
Parameters:
phi - double
theta - double[]
beta - double[]
Returns:
double

testPhi

public double testPhi(double Phi)
put your documentation comment here
Parameters:
Phi -  
Returns:
Description of the Returned Value

testBeta

public double testBeta(double[] Beta)
put your documentation comment here
Parameters:
Beta -  
Returns:
Description of the Returned Value

testPhiBeta

public double testPhiBeta(double Phi,
                          double[] Beta)
put your documentation comment here
Parameters:
Phi -  
Beta -  
Returns:
Description of the Returned Value

beta

public double[] beta()
Description of the Method
Returns:
Description of the Returned Value

createEigenvalues

protected void createEigenvalues()
Gets the Eigenvalues attribute of the OrdinalSpatialAbstract object

ll

protected double ll(int i)
Description of the Method
Parameters:
i - Description of Parameter
Returns:
Description of the Returned Value

initializeL

protected void initializeL()
Description of the Method

grad

protected void grad(double[] g)
             throws UnsupportedOperationException
Description of the Method
Parameters:
g - Description of Parameter
Throws:
UnsupportedOperationException - Description of Exception

createSigma

protected void createSigma(double Phi)
Insert the method's description here.
Parameters:
Phi - Description of Parameter

createW

protected void createW()
Description of the Method

ll

protected double ll()
Insert the method's description here. Insert the method's description here. Description of the Method
Returns:
Description of the Returned Value

createLoc

protected void createLoc()
Insert the method's description here. Creation date: (11/19/2000 2:20:40 PM)

define

protected void define()
put your documentation comment here

makeThetaLU

protected void makeThetaLU()
Description of the Method

test

protected double test(double Phi,
                      double[] Beta)
put your documentation comment here
Parameters:
Phi -  
Beta -  
Returns:
Description of the Returned Value