EqualityConstr {SGB} | R Documentation |
Equality constraints for overall shape and/or regression parameters and jacobian
Description
Setting of equality constraints on parameters.
heqa.SGB
sets the overall shape parameter to shape1
.
heqb.SGB
sets specified regression parameters to 0.
heqab.SGB
is a combination of both.
heqa.SGB.jac
, heqb.SGB.jac
, heqab.SGB.jac
compute the corresponding Jacobians.
Usage
heqa.SGB(x, d, u, bound, shape1, ...)
heqa.SGB.jac(x, ...)
heqb.SGB(x, d, u, bound, shape1, index, ...)
heqb.SGB.jac(x, d, u, bound, shape1, index, ...)
heqab.SGB(x, d, u, bound, shape1, index, ...)
heqab.SGB.jac(x, d, u, bound, shape1, index, ...)
Arguments
x |
current vector of parameters ( |
d |
data matrix of explanatory variables (without constant vector) |
u |
data matrix of compositions (independent variables) |
bound |
not used. |
shape1 |
chosen fixed value of the overall shape parameter. |
index |
vector of length equal to the number of fixed parameters; specifies the indices of the fixed components in the vector of parameters |
... |
not used. |
Details
These functions are invoked by regSGB
through the specification of the function name, shape1
and/or index
.
Value
heqa.SGB
, heqb.SGB
, heqab.SGB
: vector of the same length as index
specifying the current value of x[index]
or x[1]-shape1
, where x
is the current vector of parameters. It should be near zero at convergence of the regression algorithm.
heqa.SGB.jac
, heqb.SGB.jac
, heqab.SGB.jac
: the corresponding jacobian matrices of dimensions length(index) \times length(x)
.
See Also
Examples
## parameter vector for a 3 parts composition with one explanatory variable (+ intercept):
x <- c(1,3.2,0.04,0.05,6,7:9)
## shape1 fixed to 1.5:
heqa.SGB(x,d,u,bound,1.5)
heqa.SGB.jac(x)
## Parameters 3 (first slope) and 4 (second intercept) fixed to 0:
heqb.SGB(x,d,u,bound,shape1,c(3,4))
heqb.SGB.jac(x,d,u,bound,shape1,c(3,4))
## Parameters 1, 3, 4 fixed to 1.5, 0, 0 respectively:
heqab.SGB(x,d,u,bound,1.5,c(1,3,4))
heqab.SGB.jac(x,d,u,bound,1.5,c(1,3,4))