lba(obj, ...)
"lba"(obj, A = NULL, B = NULL, K = 1L, cA = NULL, cB = NULL, logitA = NULL, logitB = NULL, omsk = NULL, psitk = NULL, S = NULL, T = NULL, row.weights = NULL, col.weights = NULL, tolG = 1e-10, tolA = 1e-05, tolB = 1e-05, itmax.unide = 1e3, itmax.ide = 1e3, trace.lba = TRUE, toltype = "all", method = c("ls", "mle"), what = c("inner","outer"), ...)
"lba"(obj, A = NULL, B = NULL, K = 1L, cA = NULL, cB = NULL, logitA = NULL, logitB = NULL, omsk = NULL, psitk = NULL, S = NULL, T = NULL, row.weights = NULL, col.weights = NULL, tolG = 1e-10, tolA = 1e-05, tolB = 1e-05, itmax.unide = 1e3, itmax.ide = 1e3, trace.lba = TRUE, toltype = "all", method = c("ls", "mle"), what = c("inner","outer"), ...)
"lba"(formula, data, A = NULL, B = NULL, K = 1L, cA = NULL, cB = NULL, logitA = NULL, logitB = NULL, omsk = NULL, psitk = NULL, S = NULL, T = NULL, row.weights = NULL, col.weights = NULL, tolG = 1e-10, tolA = 1e-05, tolB = 1e-05, itmax.unide = 1e3, itmax.ide = 1e3, trace.lba = TRUE, toltype = "all", method = c("ls", "mle"), what = c("inner","outer"), ...)
"lba"(obj, A , B , K , row.weights , col.weights , tolA , tolB , itmax.unide , itmax.ide , trace.lba , what , ...)
"lba"(obj, A , B , K , tolG , tolA , tolB , itmax.unide , itmax.ide , trace.lba , toltype , what , ...)
"lba"(obj, A , B , K , cA , cB , row.weights , col.weights , itmax.ide , trace.lba , ...)
"lba"(obj, A , B , K , cA , cB , tolG , tolA , tolB , itmax.ide , trace.lba , toltype , ...)
"lba"(obj, A , B , K , cA , cB , logitA , logitB , omsk , psitk , S , T , row.weights , col.weights , itmax.ide , trace.lba , ...)
"lba"(obj, A , B , K , cA , cB , logitA , logitB , omsk , psitk , S , T , itmax.ide , trace.lba , ...)"xtabs" or "table" and one-sided formulae of the form Row1 + Row2 + ... + Rown ~ Col1 + Col2 + ... + Coln, where Rown and Coln are nth row (the mixing parameters) and column variable (the latent components).formula.NULL, producing random starting values.NULL, producing random starting values.1.NULL, indicating no constraints.NULL, indicating no constraints.NULL, producing random starting values.NULL, producing random starting values.NULL.NULL.NULL.NULL. If both row.weights and col.weights are NULL and "ls" method is chosen, then ordinary least squares is used.1e-10.1e-05.1e-05.1e3.1e3.base function optim and constrOptim.nl from package alabama, will trace their results. The default is TRUE."all" when the one-iteration change in the estimated likelihood ratio statistics G2 is less than tolG, and the one-iteration change in the maximum of the absolute value of the element wise difference of the estimated matrices A is less than tolA and the same for estimated matrices B with respect to tolB; "G2" when the only one-iteration change in the estimated likelihood ratio statistics G2 is less than tolG; "ab" when only the one-iteration change in the maximum of the absolute value of the element wise difference of the estimated matrices A is less than tolA and the same for estimated matrices B with respect to tolB. toltype works only for method = "mle". The default is "all". The ls method uses only "ab" as tolerance limit."ls" when least squares, either weighted or ordinary, method is
used; "mle" when maximum likelihood method is used. The default is "ls"."inner" extreme solution and the "outer" extreme solution. The default is "inner".lba.ls and lba.mle returns a list of class lba.ls and lba.mle respectively with the slots:P - pij.lba.ls.fe and lba.mle.fe returns a list of class lba.ls.fe and lba.mle.fe respectively with the slots:P - pij.lba.ls.logit and lba.mle.logit returns a list of class lba.ls.logit and lba.mle.logit respectively with the slots:P - pij.de Leeuw, J., and van der Heijden, P.G.M. 1988. "The analysis of time-budgets with a latent time-budget model". In E. Diday (Ed.), Data Analysis and Informatics V. pp. 159-166. Amsterdam: North-Holland.
de Leeuw, J., van der Heijden, P.G.M., and Verboon, P. 1990. "A latent time budget model". Statistica Neerlandica. 44, 1, 1-21.
Dempster, A.P., Laird, N.M., and Rubin, D.B. 1977. "Maximum likelihood from incomplete data via the EM algorithm". Journal of the Royal Statistical Society, Series. 39, 1-38.
van der Ark, A.L. 1999. Contributions to Latent Budget Analysis, a tool for the analysis of comositional data. Ph.D. Thesis University of Utrecht.
van der Heijden, P.G.M., Mooijaart, A., and de Leeuw, J. 1992. "Constrained latent budget analysis". In P.V. Marsden (Ed.), Sociological Methodology pp. 279-320. Cambridge: Blackwell Publishers.
goodnessfit, summary.lba, plot.lba
data('votB')
# Using LS method (default) without constraint
# K = 2
ex1 <- lba(city ~ parties,
votB,
K = 2)
ex1
# Already tabulated data? Ok!
data('PerfMark')
ex2 <- lba(as.matrix(PerfMark),
K = 2,
what='outer')
ex2
# Using LS method (default) with constraint
# Fixed constraint to mixing parameters
cakiF1 <- matrix(c(0.2, NA, NA,
NA , NA,0.2,
NA , NA,0.2,
0.3, NA, NA,
0.2, NA, NA,
NA , NA, NA),
byrow = TRUE,
ncol = 3)
# K = 3
exf1 <- lba(city ~ parties,
votB,
cA = cakiF1,
K = 3)
exf1
Run the code above in your browser using DataLab