I am facing a modeling problem:
$t_{ij} = D_i + T_j + \epsilon_{ij}, i=0...641, j\in\mathbb{N}$
where $\epsilon_{ij}$ follows exponential distribution,
$\epsilon_{ij} \sim \lambda e^{-\lambda t}, \lambda \approx 1/26 \mathrm{ns}$.
If $\epsilon_{ij}$ is treated as normal, the problem can be modeled as ANCOVA. For example in R:
# i and j are categorical (factors in R)
lm(t ~ i + j, data)
It works as a good approximation, but the residual plot is highly skewed. I am thinking of treating $\epsilon_{ij}$ as exponential.
In terms of a generalized linear model, I need a shifted exponential as residual distribution. The questions are:
- Is a shifted exponential distribution in the exponential family?
- If 1 is yes, how can I express it as an R glm() call? glm can use poisson, binomial, etc. as residual distributions. But no exponential is provided.
- If 1 is no, what is the best way to fit this model? Should it be generalized nonlinear model (R package gnm) or something else?
I wrote a maximum likelihood fitter for the exponential residual, but it is slow and non-intuitive.