Estimator functions for probabilistic index models
Description
This page documents different possibilities for solving the score function
of a probabilistic index model or pim
. All functions mentioned on this page, are essentially wrappers around different solver functions.
Usage
1 2 3 4 5 6 7 8 
Arguments
x 
a model matrix for the respective pim model. See also

y 
a vector with the response for the respective pim model. 
start 
a vector as long as there are columns in 
link 
a character vector describing the link function. This link function is used to adapt the calculation depending on the link used in the fitting process. 
construct 
a function that creates the score function
used by either 
... 
extra arguments passed down to the actual solver function. See details. 
method 
A vector of integers specifying which
BarzilaiBorwein steplengths should be used in a consecutive
manner. The methods will be used in the order specified.
More information on the help page of 
control 
a list with extra controlling parameters for

Details
All functions share the same three arguments, being the design matrix x
,
the response vector y
and the start values for the estimating function.
If you follow the same principles, you can write your own wrapper function
for any solver function of your choice.
The solvers estimator.nleqslv
and estimator.BBsolve
allow for specification of your own score function as well. For
this, you have the possibility to construct a function that takes three arguments
 x
The model matrix
 y
the vector with pseudoobservations
 link
a character vector specifying the link
The function should return a function that can be used in
either nleqslv
or
BBsolve
. If you don't specify this construct function, the package
contains the function CreateScoreFun
to do
this for you.
Value
a list with following elements:
coef 
the estimated coefficients 
WARNING
If you specify your own score function without changing the estimators for the variancecovariance matrix, this vcov matrix will be blatantly wrong!!!!!
See Also
nleqslv
, glm.fit
,
BBsolve
for more information on the fitting
algorithms.
vcov.estimators
, pim.fit
and
pim
for more information on the fitting process
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  # This is a reimplementation of the identity link
myconstruct < function(x,y,link){
# this function is returned
function(beta){
xb < as.vector(x %*% beta)
colSums(x * (y  xb))
}
}
data(ChickWeight)
themodel < pim(weight ~ Diet, data = ChickWeight,
construct = myconstruct)
# compare coefficients to
themodel2 < pim(weight ~ Diet, data = ChickWeight,
link = "identity")
coef(themodel)
coef(themodel2)
# Note that this example uses a wrong estimate for the variancecovariance matrix
# You have to specify the correct vcov estimator as well
