Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: gplm
See also: gplmopt gplminit gplmcore gplmest glmstat

Macro: gplmstat
Description: gplmstat provides some statistics for a fitted GPLM.

Link:
Usage: stat = gplmstat(code,x,t,y,b,m{,wx{,off}})
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 bandwith.
b p x 1 vector, estimated coefficients.
m n x 1 vector, estimated nonparametric part
opt optional, a list with optional input. The macro "gplmopt" can be used to set up this parameter. The order of the list elements is not important. Parameters which are not given are replaced by defaults (see below).
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.off scalar or n x 1 vector, offset in linear predictor. If not given, set to 0.
opt.pow scalar, power for power link. If not given, set to 0 (logarithm).
opt.nbk scalar, extra parameter k for negative binomial distribution. If not given, set to 1 (geometric distribution).
Output:
stat list with the following statistics:
stat.serror standard errors of parameter estimates.
stat.tvalue t-values for parameter estimates.
stat.pvalue p-values for significance of parameter estimates.
stat.df degrees of freedom.
stat.deviance deviance.
stat.pearson generalized pearson's chi^2.
stat.loglik log-likelihood.
stat.dispersion dispersion parameter estimate =pearson/df.
stat.r2 (pseudo) R^2.
stat.adr2 adjusted (pseudo) R^2.
stat.aic AIC criterion.
stat.bic BIC criterion.

Example:
library("gplm")
;==========================
;  simulate data 
;==========================
n=100
b=6|-6
p=rows(b)
bv=0.001*unit(p)
df=n
x=2.*uniform(n,p)-1
t=sort(2.*uniform(n)-1,1)
m=cos(pi.*t)
y=( 1./(1+exp(-x*b-m)).>uniform(n) )
;==========================
;  compute statistics
;==========================
stat=gplmstat("bilo",x,t,y,b,bv,m,df)
Result:
should be quit good :-)

Library: gplm
See also: gplmopt gplminit gplmcore gplmest glmstat

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Marlene Mueller, 2000/05/10
(C) MD*TECH Method and Data Technologies, 17.8.2000