Description Usage Arguments Value Author(s) Examples
Estimation by maximum likelihood of glm (binomial and Poisson) and 'glm-like' models (Negbin and ordered) on longitudinal data
1 2 3 4 |
formula |
a symbolic description of the model to be estimated, |
data |
the data: a |
subset |
an optional vector specifying a subset of observations, |
na.action |
a function which indicates what should happen when
the data contains ' |
effect |
the effects introduced in the model, one of
|
model |
one of |
family |
the distribution to be used, |
other |
for developper's use only, |
index |
the index, |
start |
a vector of starting values, |
R |
the number of function evaluation for the gaussian quadrature method used, |
... |
further arguments. |
An object of class "pglm"
, a list with elements:
coefficients |
the named vector of coefficients, |
logLik |
the value of the log-likelihood, |
hessian |
the hessian of the log-likelihood at convergence, |
gradient |
the gradient of the log-likelihood at convergence, |
call |
the matched call, |
est.stat |
some information about the estimation (time used, optimisation method), |
freq |
the frequency of choice, |
residuals |
the residuals, |
fitted.values |
the fitted values, |
formula |
the formula (a |
expanded.formula |
the formula (a |
model |
the model frame used, |
index |
the index of the choice and of the alternatives. |
Yves Croissant
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ## an ordered probit example
data('Fairness', package = 'pglm')
Parking <- subset(Fairness, good == 'parking')
op <- pglm(as.numeric(answer) ~ education + rule,
Parking[1:105, ],
family = ordinal('probit'), R = 5, print.level = 3,
method = 'bfgs', index = 'id', model = "random")
## a binomial (probit) example
data('UnionWage', package = 'pglm')
anb <- pglm(union ~ wage + exper + rural, UnionWage, family = binomial('probit'),
model = "pooling", method = "bfgs", print.level = 3, R = 5)
## a gaussian example on unbalanced panel data
data(Hedonic, package = "plm")
ra <- pglm(mv ~ crim + zn + indus + nox + age + rm, Hedonic, family = gaussian,
model = "random", print.level = 3, method = "nr", index = "townid")
## some count data models
data("PatentsRDUS", package="pglm")
la <- pglm(patents ~ lag(log(rd), 0:5) + scisect + log(capital72) + factor(year), PatentsRDUS,
family = negbin, model = "within", print.level = 3, method = "nr",
index = c('cusip', 'year'))
la <- pglm(patents ~ lag(log(rd), 0:5) + scisect + log(capital72) + factor(year), PatentsRDUS,
family = poisson, model = "pooling", index = c("cusip", "year"),
print.level = 0, method="nr")
## a tobit example
data("HealthIns", package="pglm")
HealthIns$med2 <- HealthIns$med / 1000
HealthIns2 <- HealthIns[-2209, ]
set.seed(2)
subs <- sample(1:20186, 200, replace = FALSE)
HealthIns2 <- HealthIns2[subs, ]
la <- pglm(med ~ mdu + disease + age, HealthIns2,
model = 'random', family = 'tobit', print.level = 0,
method = 'nr', R = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.