Usage: |
myfit = gplmbootstraptest(code,x,t,y,h,nboot{,opt})
|
Input: |
| code | text string, the short code for the model (e.g.
"bilo" for logit or "noid" for ordinary PLM).
|
| x | n x p matrix, the discrete predictor variables.
|
| t | n x q matrix, the continuous predictor variables.
|
| y | n x 1 vector, the response variables.
|
| h | q x 1 vector, the bandwidth vector.
|
| nboot | integer, number of bootstrap replications.
If nboot<=0, the test is performed using the
asymptotic normal distribution of the test
statistics.
|
| opt | optional, a list with optional input.
"gplmopt" can be used to set up this parameter.
The order of the list elements is not important.
|
| opt.b0 | p x 1 vector, the initial coefficients. If not
given, all coefficients are put =0 initially.
|
| opt.m0 | n x 1 vector, the initial values for the nonparametric
part. If not given, a default is used.
|
| opt.tg | ng x 1 vector, a grid for continuous part. If tg is
given, the nonparametric function will also be
computed on this grid.
|
| opt.tdesign | n x r matrix, design for parametric fit for
m(t). This allows to test e.g. quadratic or
cubic functions against m(t).
If not given a linear function (incl. constant)
will be tested by using the design matrix(n)~t.
|
| opt.weights | string, type of observation weights. Can be
"frequency" for replication counts, or "prior"
(default) for prior weights in weighted regression.
|
| opt.wx | scalar or n x 1 vector, frequency or prior
weights. If not given, set to 1.
|
| opt.wt | n x 1 vector, weights for t (trimming factors).
If not given, set to 1.
|
| opt.wc | n x 1 vector, weights for convergence criterion,
w.r.t. m(t) only. If not given, opt.wt is used.
|
| opt.wr | n x 1 vector, weights for test statistics.
If not given, set to 1.
|
| opt.off | scalar or n x 1 vector, offset. Can be used for
constrained estimation. If not given, set to 0.
|
| opt.meth | integer, if -1, a backfitting is performed,
if 1 a profile likelihood method is used, and
0 a simple profile likelihood is used.
The default is 0.
|
| opt.fscor | integer, if exists and =1, a Fisher scoring is
performed (instead of the default Newton-Raphson
procedure). This parameter is ignored for
canonical links.
|
| opt.shf | integer, if exists and =1, some output is produced
which indicates how the iteration is going on.
|
| opt.nosort | integer, if exists and =1, the continuous variables
t and the grid tg are assumed to be sorted by the
1st column. Sorting is required by the algorithm,
hence you should switch if off only when the data
are already sorted.
|
| opt.miter | integer, maximal number of iterations. The default
is 10.
|
| opt.cnv | integer, convergence criterion. The default is 0.0001.
|
| opt.pow | scalar, power for power link. If not given,
set to 0.
|
| opt.nbk | scalar, extra parameter k for negative binomial
distribution. If not given, set to 1 (geometric
distribution).
|
Output: |
| myfit.b | k x 1 vector, estimated coefficients |
| myfit.bv | k x k matrix, estimated covariance matrix for b |
| myfit.m | n x 1 vector, estimated nonparametric part |
| myfit.mg | ngx 1 vector, estimated nonparametric part on grid |
| myfit.rr | 3 x 1 vector, 3 test statistics according
to Haerdle/Mammen/Mueller |
| myfit.alpha | 3 x 1 vector, significance level for rejection of
the parametric hypothesis (for each of the three test
statisctics). |
| myfit.stat | list with the following statistics: |
| myfit.stat.deviance | deviance, |
| myfit.stat.pearson | generalized pearson's chi^2, |
| myfit.stat.loglik | log-likelihood, |
| myfit.stat.r2 | pseudo R^2, |
| myfit.stat.it | 2 x 1 vector, number of iterations needed in
semiparametric and biased parametric fit |
| myfit.stat.ret | scalar, return code:
0 o.k.,
1 maximal number of iterations reached
in estimation (if applicable),
-1 missing values have been encountered
in estimation,
-2 missing values in test statistics encountered.
-3 missing values in bootstrap encountered. |
| myfit.stat.rrboot | nboot x 3 matrix, values of the bootstrap test
statistics (if applicable). |