Description Usage Arguments Details Value Author(s) See Also Examples
Fit right censored Multiple Ordinal Tobit (MOT) model.
1 2 |
formula |
Object of class formula describing the model. |
data |
Optional data frame or environment containing the variables in the model. |
threshold |
Vector of thresholds in the model. |
stdEr |
Method for standard error estimation. Use "fisher" for estimation using the inverse of the Fisher information matrix or "hessian" for estimation using the Hessian matrix. |
... |
Further arguments passed to the maximum likelihood estimation function maxLik. |
Fit right censored Multiple Ordinal Tobit (MOT) model. The model is a right censored Tobit model with multiple ordinal categories for latent values above the threshold, the threshold is therefore replaced by a threshold vector.
For the latent variable a linear model with independent and identically distributed non-systematic and homoscedastic errors is assumed.
If the threshold is of length 1, the model is equivalent to the standard right censored Tobit model.
The data is fitted with the Maximum Likelihood method.
lmmot object: maxLik object with additional fields:
censoring: Number of obeservations in the censoring intervals.
fisherInfo: Fisher information matrix.
stdEr: Standard errors for estimated coefficients.
tval: Value for t statistic in Wald test.
pval: p-value in Wald test.
fitted.values: Fitted values of the estimated model.
residuals: Residuals of the estimated model.
Marvin N. Wright
lm maxLik
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 | # Random data for x
N <- 100
x <- rnorm(N, 25, 10)
# Simulate data for latent variable ystar with simple linear model
beta_0 <- 60
beta_1 <- 1
sigma <- 8
ystar <- beta_0 + beta_1*x + rnorm(N, 0, sigma)
# Simulate censoring for observed variable y
y <- ystar
y[y >= 100] <- 100
y[(y >= 90) & (y < 100)] <- 90
y[(y >= 80) & (y < 90)] <- 80
# MOT regression with observed variable y
mot.fit <- lmmot(y ~ x, threshold = c(80, 90, 100))
# Show details
summary(mot.fit)
# Compare real data with model fit
plot(x, ystar)
abline(coefficients(mot.fit)[1:2])
|
Loading required package: maxLik
Loading required package: miscTools
Please cite the 'maxLik' package as:
Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.
If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
https://r-forge.r-project.org/projects/maxlik/
Loading required package: MASS
Call:
lmmot(formula = y ~ x, threshold = c(80, 90, 100))
Censoring:
uncensored c1 c2 c3 total
34 29 26 11 100
Coefficients:
Estimate Std. error t value Pr(> t)
(Intercept) 5.852e+01 2.782e+00 2.104e+01 4.071e-38
x 1.041e+00 1.036e-01 1.005e+01 9.517e-17
sigma 8.808e+00 7.997e-01 1.101e+01 7.720e-19
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.