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

« back to all changes in this revision

Viewing changes to man/cardioid.Rd

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lawrence
  • Date: 2010-07-07 03:44:27 UTC
  • mfrom: (1.1.9 upstream) (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100707034427-n9bg1n6f5qfzta87
Tags: 0.8-1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
  cardioid distribution by maximum likelihood estimation.
8
8
}
9
9
\usage{
10
 
cardioid(lmu="elogit", lrho="elogit",
11
 
         emu =if(lmu=="elogit") list(min=0, max=2*pi) else list(),
12
 
         erho=if(lmu=="elogit") list(min=-0.5, max=0.5) else list(),
13
 
         imu=NULL, irho=0.3, nsimEIM=100, zero=NULL)
 
10
cardioid(lmu = "elogit", lrho = "elogit",
 
11
         emu = if(lmu == "elogit") list(min = 0, max = 2*pi) else list(),
 
12
         erho = if(lmu == "elogit") list(min = -0.5, max = 0.5) else list(),
 
13
         imu = NULL, irho = 0.3, nsimEIM = 100, zero = NULL)
14
14
}
15
15
%- maybe also 'usage' for other objects documented here.
16
16
\arguments{
49
49
 The default link functions enforce the range constraints
50
50
 of the parameters.
51
51
 
 
52
 
52
53
  For positive \eqn{\rho} the distribution is unimodal and symmetric about
53
54
  \eqn{\mu}{mu}.
54
55
  The mean of \eqn{Y} (which make up the fitted values) is
95
96
 
96
97
}
97
98
\examples{
98
 
carddata = data.frame(y = rcard(n=1000, mu=4, rho=0.45))
99
 
fit = vglm(y ~ 1, cardioid, carddata, trace=TRUE) 
 
99
cdata = data.frame(y = rcard(n = 1000, mu = 4, rho = 0.45))
 
100
fit = vglm(y ~ 1, cardioid, cdata, trace=TRUE) 
100
101
coef(fit, matrix=TRUE)
101
102
Coef(fit)
102
 
c(with(carddata, mean(y)), head(fitted(fit),1))
 
103
c(with(cdata, mean(y)), head(fitted(fit), 1))
103
104
summary(fit)
104
105
}
105
106
\keyword{models}