~ubuntu-branches/ubuntu/trusty/r-cran-vgam/trusty

« back to all changes in this revision

Viewing changes to man/freund61.Rd

  • Committer: Package Import Robot
  • Author(s): Chris Lawrence
  • Date: 2011-11-04 13:13:06 UTC
  • mfrom: (1.2.9)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20111104131306-w9fd83i51rw60gxf
Tags: upstream-0.8-4
ImportĀ upstreamĀ versionĀ 0.8-4

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
}
11
11
\usage{
12
 
freund61(la = "loge", lap = "loge", lb = "loge", lbp = "loge",
 
12
freund61(la = "loge",  lap = "loge",  lb = "loge", lbp = "loge",
 
13
         ea  = list(), eap = list(), eb  = list(), ebp = list(),
13
14
         ia = NULL, iap = NULL, ib = NULL, ibp = NULL,
14
15
         independent = FALSE, zero = NULL)
15
16
}
16
17
%- maybe also 'usage' for other objects documented here.
17
18
\arguments{
18
 
  \item{la,lap,lb,lbp}{
19
 
  Link function applied to the (positive)
 
19
  \item{la,lap,lb,lbp,ea,eap,eb,ebp}{
 
20
  Link functions and extra arguments applied to the (positive)
20
21
  parameters \eqn{\alpha}{alpha}, \eqn{\alpha'}{alpha'},
21
22
  \eqn{\beta}{beta} and \eqn{\beta'}{beta'}, respectively
22
23
  (the ``\code{p}'' stands for ``prime'').
172
173
 
173
174
}
174
175
\examples{
175
 
y1 = rexp(n <- 200, rate = 4)
176
 
y2 = rexp(n, rate = 8)
177
 
ymat = cbind(y1,y2)
178
 
fit =  vglm(ymat ~ 1, fam = freund61, trace = TRUE)
 
176
fdata = data.frame(y1 = rexp(nn <- 200, rate = 4))
 
177
fdata = transform(fdata, y2 = rexp(nn, rate = 8))
 
178
fit =  vglm(cbind(y1, y2) ~ 1, fam = freund61, fdata, trace = TRUE)
179
179
coef(fit, matrix = TRUE)
180
180
Coef(fit)
181
181
vcov(fit)
183
183
summary(fit)
184
184
 
185
185
# y1 and y2 are independent, so fit an independence model
186
 
fit2 = vglm(ymat ~ 1, fam = freund61(indep = TRUE), trace = TRUE)
 
186
fit2 = vglm(cbind(y1, y2) ~ 1, fam = freund61(indep = TRUE),
 
187
            fdata, trace = TRUE)
187
188
coef(fit2, matrix = TRUE)
188
189
constraints(fit2)
189
 
pchisq(2*(logLik(fit)-logLik(fit2)), df = 2, lower.tail = FALSE) # p-value
 
190
pchisq(2 * (logLik(fit)-logLik(fit2)),    # p-value
 
191
       df = df.residual(fit2) - df.residual(fit), lower.tail = FALSE)
190
192
}
191
193
\keyword{models}
192
194
\keyword{regression}