Description Usage Arguments Details Value Author(s) See Also Examples
Zero truncated generalized linear model.
1 |
y |
vector of response values |
S |
design matrix |
exposure |
exposure time for the zero-truncated Poisson model, all entries of the vector have to be >0. Default is a constant vector of 1. |
sd.error |
logical. Should the standard errors of the regression coefficients be returned? Default is FALSE. |
We consider positive count variables Y_i. We model Y_i in terms of a covariate vector s_i. The generalized linear model is specified via
Y_i\sim ZTP(λ_{i})
with \ln(λ_{i})=\ln(e_i)+{s_i}^\top β. Here e_i denotes the exposure time.
coefficients |
estimated regression coefficients |
sd |
estimated standard error, if |
Nicole Kraemer
1 2 3 4 5 6 7 8 9 10 11 12 13 | n<-200 # number of examples
R<-S<-cbind(rep(1,n),rnorm(n)) # design matrices with intercept
alpha<-beta<-c(1,-1) # regression coefficients
exposure<-rep(1,n) # constant exposure
delta<-0.5 # dispersion parameter
tau<-0.3 # Kendall's tau
family=3 # Clayton copula
# simulate data
my.data<-simulate_regression_data(n,alpha,beta,R,S,delta,tau,family,TRUE,exposure)
x<-my.data[,1]
y<-my.data[,2]
# fit marginal ZTP-model with standard errors
my.model<-ztp.glm(y,S,exposure=exposure,TRUE)
|
Loading required package: MASS
Loading required package: VineCopula
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.