R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("ltm-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('ltm') Loading required package: MASS > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "Abortion" > > ### * Abortion > > flush(stderr()); flush(stdout()) > > ### Name: Abortion > ### Title: Attitude Towards Abortion > ### Aliases: Abortion > ### Keywords: datasets > > ### ** Examples > > > ## Descriptive statistics for Abortion data > descript(Abortion) Proportions of positive/negative responses: Item 1 Item 2 Item 3 Item 4 0 0.56 0.41 0.36 0.38 1 0.44 0.59 0.64 0.62 Pair-wise Associations: Item i Item j p.value 1 1 4 <2e-16 2 1 3 <2e-16 3 2 4 <2e-16 4 1 2 <2e-16 5 2 3 <2e-16 6 3 4 <2e-16 > > > > > cleanEx(); ..nameEx <- "Lsat" > > ### * Lsat > > flush(stderr()); flush(stdout()) > > ### Name: Lsat > ### Title: The Law School Admission Test (LSAT), Section VI > ### Aliases: Lsat > ### Keywords: datasets > > ### ** Examples > > > ## Descriptive statistics for Lsat data > descript(Lsat) Proportions of positive/negative responses: Item 1 Item 2 Item 3 Item 4 Item 5 0 0.08 0.29 0.45 0.24 0.13 1 0.92 0.71 0.55 0.76 0.87 Pair-wise Associations: Item i Item j p.value 1 1 5 0.565 2 1 4 0.208 3 3 5 0.113 4 2 4 0.059 5 1 2 0.028 6 2 5 0.009 7 1 3 0.003 8 4 5 0.002 9 3 4 7e-04 10 2 3 4e-04 > > > > > cleanEx(); ..nameEx <- "Mobility" > > ### * Mobility > > flush(stderr()); flush(stdout()) > > ### Name: Mobility > ### Title: Women's Mobility > ### Aliases: Mobility > ### Keywords: datasets > > ### ** Examples > > > ## Descriptive statistics for Mobility data > descript(Mobility) Proportions of positive/negative responses: Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Item 7 Item 8 0 0.2 0.69 0.25 0.64 0.93 0.89 0.95 0.91 1 0.8 0.31 0.75 0.36 0.07 0.11 0.05 0.09 Pair-wise Associations: Item i Item j p.value 1 1 7 <2e-16 2 1 5 <2e-16 3 1 8 <2e-16 4 3 7 <2e-16 5 3 5 <2e-16 6 3 8 <2e-16 7 1 6 <2e-16 8 3 6 <2e-16 9 2 3 <2e-16 10 2 7 <2e-16 > > > > > cleanEx(); ..nameEx <- "Wirs" > > ### * Wirs > > flush(stderr()); flush(stdout()) > > ### Name: Wirs > ### Title: Workplace Industrial Relation Survey Data > ### Aliases: Wirs > ### Keywords: datasets > > ### ** Examples > > > ## Descriptive statistics for Wirs data > descript(Wirs) Proportions of positive/negative responses: Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 0 0.63 0.42 0.72 0.76 0.64 0.85 1 0.37 0.58 0.28 0.24 0.36 0.15 Pair-wise Associations: Item i Item j p.value 1 2 6 0.097 2 2 3 0.048 3 1 3 0.024 4 1 6 0.009 5 1 5 0.008 6 1 4 0.002 7 2 5 5e-04 8 4 6 6e-07 9 2 4 5e-09 10 4 5 8e-12 > > > > > cleanEx(); ..nameEx <- "anova.ltm" > > ### * anova.ltm > > flush(stderr()); flush(stdout()) > > ### Name: anova.ltm > ### Title: Anova method for ltm objects > ### Aliases: anova.ltm > ### Keywords: methods multivariate > > ### ** Examples > > > ## LRT between the one- and two-factor model > ## for the Wirs data: > m1 <- ltm(Wirs~z1) > m2 <- ltm(Wirs~z1+z2) > anova(m1, m2) Anova Table AIC BIC log.Lik LRT df p.value m1 6864.13 6923.08 -3420.06 m2 6719.09 6807.52 -3341.55 157.03 6 <0.001 > > ## LRT between the two-factor and the interaction > ## model for the Mobility data: > m1 <- ltm(Mobility~z1+z2) > m2 <- ltm(Mobility~z1*z2) > anova(m1, m2) Anova Table AIC BIC log.Lik LRT df p.value m1 46069.57 46238.56 -23010.79 m2 45977.44 46202.76 -22956.72 108.13 8 <0.001 > > > > > cleanEx(); ..nameEx <- "anova.rasch" > > ### * anova.rasch > > flush(stderr()); flush(stdout()) > > ### Name: anova.rasch > ### Title: Anova method for rasch objects > ### Aliases: anova.rasch > ### Keywords: methods multivariate > > ### ** Examples > > > ## Not run: > ##D ## GoF for the Rasch model for the Wirs data: > ##D ## using 99+1 bootstrap samples > ##D m <- rasch(Wirs) > ##D anova(m, B = 99) > ## End(Not run) > > ## GoF for the Rasch model for the Lsat data: > m <- rasch(Lsat) > anova(m) Goodness-of-Fit using Pearson chi-squared Call: rasch(data = Lsat) Tobs: 18.38 # bootstrap samples: 50 p-value: 0.86 > > ## An LRT between the constrained (discrimination > ## parameter equals 1) and the unconstrained Rasch > ## model for the Wirs data: > m0 <- rasch(Wirs, constraint = rbind(c(7, 1))) > m1 <- rasch(Wirs) > anova(m0, m1) Anova Table AIC BIC log.Lik LRT df p.value m0 7045.30 7074.78 -3516.65 m1 7032.56 7066.95 -3509.28 14.74 1 <0.001 > > ## An LRT between the Rasch and the one-factor model > ## for the Wirs data: > m0 <- rasch(Wirs) > m1 <- ltm(Wirs~z1) > anova(m0, m1) Anova Table AIC BIC log.Lik LRT df p.value m0 7032.56 7066.95 -3509.28 m1 6864.13 6923.08 -3420.06 178.43 5 <0.001 > > ## An LRT between constrained (discrimination > ## parameter equals 1) and the unconstrained Rasch > ## model for the Lsat data: > m0 <- rasch(Lsat, constraint = rbind(c(6, 1))) > m1 <- rasch(Lsat) > anova(m0, m1) Anova Table AIC BIC log.Lik LRT df p.value m0 4956.11 4980.65 -2473.05 m1 4945.88 4975.32 -2466.94 12.23 1 <0.001 > > > > > cleanEx(); ..nameEx <- "coef.ltm" > > ### * coef.ltm > > flush(stderr()); flush(stdout()) > > ### Name: coef.ltm > ### Title: Loadings for ltm objects > ### Aliases: coef.ltm > ### Keywords: methods multivariate > > ### ** Examples > > > m1 <- ltm(Lsat~z1) > coef(m1) (Intercept) z1 Item 1 2.77 -0.82 Item 2 0.99 -0.72 Item 3 0.25 -0.89 Item 4 1.28 -0.69 Item 5 2.05 -0.66 > coef(m1, TRUE) (Intercept) z1 std.z1 Item 1 2.77 -0.82 -0.64 Item 2 0.99 -0.72 -0.59 Item 3 0.25 -0.89 -0.66 Item 4 1.28 -0.69 -0.57 Item 5 2.05 -0.66 -0.55 > > m2 <- ltm(Wirs~z1+z2) Warning in ltm.fit(X, betas, constraint, factors, inter, quad.z1, quad.z2, : approximate Hessian matrix at convergence is not positive definite, unstable solution; re-fit the model. > coef(m2) (Intercept) z1 z2 Item 1 -0.94 -2.25 0.68 Item 2 0.54 1.72 0.50 Item 3 -1.40 0.03 1.72 Item 4 -1.47 0.71 1.00 Item 5 -0.97 0.11 2.01 Item 6 -2.39 -0.10 1.49 > coef(m2, TRUE) (Intercept) z1 std.z1 z2 std.z2 Item 1 -0.94 -2.25 -0.82 0.68 0.25 Item 2 0.54 1.72 0.75 0.50 0.22 Item 3 -1.40 0.03 0.01 1.72 0.77 Item 4 -1.47 0.71 0.38 1.00 0.53 Item 5 -0.97 0.11 0.04 2.01 0.82 Item 6 -2.39 -0.10 -0.05 1.49 0.72 > > > > > cleanEx(); ..nameEx <- "coef.rasch" > > ### * coef.rasch > > flush(stderr()); flush(stdout()) > > ### Name: coef.rasch > ### Title: Loadings for rasch objects > ### Aliases: coef.rasch > ### Keywords: methods multivariate > > ### ** Examples > > > m1 <- rasch(Lsat) > coef(m1) beta.i beta Item 1 2.73 0.76 Item 2 1.00 0.76 Item 3 0.24 0.76 Item 4 1.31 0.76 Item 5 2.10 0.76 > > m2 <- rasch(Abortion) > coef(m2) beta.i beta Item 1 -0.79 4.36 Item 2 1.03 4.36 Item 3 1.56 4.36 Item 4 1.33 4.36 > > > > > cleanEx(); ..nameEx <- "descript" > > ### * descript > > flush(stderr()); flush(stdout()) > > ### Name: descript > ### Title: Descriptive Statistics for Response Matrices > ### Aliases: descript > ### Keywords: multivariate > > ### ** Examples > > > ## Descriptives for Wirs data: > descript(Wirs) Proportions of positive/negative responses: Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 0 0.63 0.42 0.72 0.76 0.64 0.85 1 0.37 0.58 0.28 0.24 0.36 0.15 Pair-wise Associations: Item i Item j p.value 1 2 6 0.097 2 2 3 0.048 3 1 3 0.024 4 1 6 0.009 5 1 5 0.008 6 1 4 0.002 7 2 5 5e-04 8 4 6 6e-07 9 2 4 5e-09 10 4 5 8e-12 > descript(Wirs, 3) Proportions of positive/negative responses: Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 0 0.63 0.42 0.72 0.76 0.64 0.85 1 0.37 0.58 0.28 0.24 0.36 0.15 Pair-wise Associations: Item i Item j p.value 1 2 6 0.097 2 2 3 0.048 3 1 3 0.024 > descript(Wirs, print=FALSE) $perc Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 0 0.63 0.42 0.72 0.76 0.64 0.85 1 0.37 0.58 0.28 0.24 0.36 0.15 $pw.ass Item i Item j p.value 1 1 2 <2e-16 2 1 3 0.024 3 1 4 0.002 4 1 5 0.008 5 1 6 0.009 6 2 3 0.048 7 2 4 5e-09 8 2 5 5e-04 9 2 6 0.097 10 3 4 3e-13 11 3 5 <2e-16 12 3 6 9e-14 13 4 5 8e-12 14 4 6 6e-07 15 5 6 <2e-16 > > > > > cleanEx(); ..nameEx <- "factor.scores" > > ### * factor.scores > > flush(stderr()); flush(stdout()) > > ### Name: factor.scores > ### Title: Factor Scores > ### Aliases: factor.scores factor.scores.ltm factor.scores.rasch > ### Keywords: multivariate > > ### ** Examples > > > ## Factor Scores for the Rasch model > m <- rasch(Wirs) > factor.scores(m) # Empirical Bayes Call: rasch(data = Wirs) Scoring Method: Empirical Bayes Factor-Scores for observed response patterns: Pattern Obs Exp z1 se.z1 1 000000 132 139.99 -0.913 0.806 2 000001 5 11.25 -0.415 0.779 3 000010 17 41.09 -0.415 0.779 4 000100 13 21.77 -0.415 0.779 5 001000 12 27.89 -0.415 0.779 6 001001 1 3.31 0.052 0.758 7 001010 2 12.09 0.052 0.758 8 001011 2 2.08 0.499 0.744 9 001100 1 6.41 0.052 0.758 10 001110 1 4.02 0.499 0.744 11 010000 172 117.39 -0.415 0.779 12 010001 4 13.93 0.052 0.758 13 010010 38 50.88 0.052 0.758 14 010011 11 8.75 0.499 0.744 15 010100 45 26.96 0.052 0.758 16 010101 1 4.64 0.499 0.744 17 010110 22 16.93 0.499 0.744 18 010111 8 4.17 0.934 0.737 19 011000 21 34.54 0.052 0.758 20 011001 2 5.94 0.499 0.744 21 011010 28 21.69 0.499 0.744 22 011011 11 5.34 0.934 0.737 23 011100 13 11.49 0.499 0.744 24 011101 3 2.83 0.934 0.737 25 011110 35 10.33 0.934 0.737 26 011111 30 3.61 1.365 0.737 27 100000 65 44.42 -0.415 0.779 28 100001 11 5.27 0.052 0.758 29 100010 34 19.26 0.052 0.758 30 100011 10 3.31 0.499 0.744 31 100100 20 10.20 0.052 0.758 32 100101 1 1.75 0.499 0.744 33 100110 5 6.41 0.499 0.744 34 100111 2 1.58 0.934 0.737 35 101000 24 13.07 0.052 0.758 36 101001 8 2.25 0.499 0.744 37 101010 31 8.21 0.499 0.744 38 101011 4 2.02 0.934 0.737 39 101100 2 4.35 0.499 0.744 40 101101 1 1.07 0.934 0.737 41 101110 8 3.91 0.934 0.737 42 101111 7 1.37 1.365 0.737 43 110000 55 55.01 0.052 0.758 44 110001 10 9.46 0.499 0.744 45 110010 26 34.55 0.499 0.744 46 110011 3 8.50 0.934 0.737 47 110100 5 18.31 0.499 0.744 48 110110 4 16.45 0.934 0.737 49 110111 2 5.76 1.365 0.737 50 111000 13 23.45 0.499 0.744 51 111001 1 5.77 0.934 0.737 52 111010 6 21.07 0.934 0.737 53 111011 5 7.37 1.365 0.737 54 111100 3 11.17 0.934 0.737 55 111101 2 3.91 1.365 0.737 56 111110 4 14.27 1.365 0.737 57 111111 3 7.10 1.800 0.745 > factor.scores(m, "MI", B=20) # Multiple Imputation with 20 imputations Call: rasch(data = Wirs) Scoring Method: Multiple Imputation # Imputations: 20 Factor-Scores for observed response patterns: Pattern Obs Exp z1 se.z1 1 000000 132 139.99 -0.911 0.806 2 000001 5 11.25 -0.413 0.778 3 000010 17 41.09 -0.413 0.778 4 000100 13 21.77 -0.413 0.778 5 001000 12 27.89 -0.413 0.778 6 001001 1 3.31 0.055 0.757 7 001010 2 12.09 0.055 0.757 8 001011 2 2.08 0.501 0.743 9 001100 1 6.41 0.055 0.757 10 001110 1 4.02 0.501 0.743 11 010000 172 117.39 -0.413 0.778 12 010001 4 13.93 0.055 0.757 13 010010 38 50.88 0.055 0.757 14 010011 11 8.75 0.501 0.743 15 010100 45 26.96 0.055 0.757 16 010101 1 4.64 0.501 0.743 17 010110 22 16.93 0.501 0.743 18 010111 8 4.17 0.935 0.736 19 011000 21 34.54 0.055 0.757 20 011001 2 5.94 0.501 0.743 21 011010 28 21.69 0.501 0.743 22 011011 11 5.34 0.935 0.736 23 011100 13 11.49 0.501 0.743 24 011101 3 2.83 0.935 0.736 25 011110 35 10.33 0.935 0.736 26 011111 30 3.61 1.365 0.737 27 100000 65 44.42 -0.413 0.778 28 100001 11 5.27 0.055 0.757 29 100010 34 19.26 0.055 0.757 30 100011 10 3.31 0.501 0.743 31 100100 20 10.20 0.055 0.757 32 100101 1 1.75 0.501 0.743 33 100110 5 6.41 0.501 0.743 34 100111 2 1.58 0.935 0.736 35 101000 24 13.07 0.055 0.757 36 101001 8 2.25 0.501 0.743 37 101010 31 8.21 0.501 0.743 38 101011 4 2.02 0.935 0.736 39 101100 2 4.35 0.501 0.743 40 101101 1 1.07 0.935 0.736 41 101110 8 3.91 0.935 0.736 42 101111 7 1.37 1.365 0.737 43 110000 55 55.01 0.055 0.757 44 110001 10 9.46 0.501 0.743 45 110010 26 34.55 0.501 0.743 46 110011 3 8.50 0.935 0.736 47 110100 5 18.31 0.501 0.743 48 110110 4 16.45 0.935 0.736 49 110111 2 5.76 1.365 0.737 50 111000 13 23.45 0.501 0.743 51 111001 1 5.77 0.935 0.736 52 111010 6 21.07 0.935 0.736 53 111011 5 7.37 1.365 0.737 54 111100 3 11.17 0.935 0.736 55 111101 2 3.91 1.365 0.737 56 111110 4 14.27 1.365 0.737 57 111111 3 7.10 1.800 0.745 > > ## Factor Scores for the one-factor model > m <- ltm(Abortion~z1) > factor.scores(m) # Component Call: ltm(formula = Abortion ~ z1) Scoring Method: Component Factor-Scores for observed response patterns: Pattern Obs Exp z1 1 0000 103 102.73 0.000 2 0001 13 16.83 -3.562 3 0010 10 12.41 -5.823 4 0011 21 14.12 -9.385 5 0100 9 9.40 -4.425 6 0101 6 7.02 -7.988 7 0110 7 11.84 -10.248 8 0111 44 41.01 -13.810 9 1000 1 1.66 -4.293 10 1011 6 6.59 -13.678 11 1100 3 0.90 -8.718 12 1101 3 2.22 -12.280 13 1110 12 7.10 -14.541 14 1111 141 142.02 -18.103 > factor.scores(m, "EB") # Empirical Bayes Call: ltm(formula = Abortion ~ z1) Scoring Method: Empirical Bayes Factor-Scores for observed response patterns: Pattern Obs Exp z1 se.z1 1 0000 103 102.73 0.891 0.464 2 0001 13 16.83 0.500 0.258 3 0010 10 12.41 0.367 0.233 4 0011 21 14.12 0.179 0.233 5 0100 9 9.40 0.446 0.245 6 0101 6 7.02 0.253 0.229 7 0110 7 11.84 0.131 0.239 8 0111 44 41.01 -0.106 0.282 9 1000 1 1.66 0.454 0.247 10 1011 6 6.59 -0.095 0.280 11 1100 3 0.90 0.214 0.230 12 1101 3 2.22 0.006 0.259 13 1110 12 7.10 -0.167 0.297 14 1111 141 142.02 -0.672 0.527 > factor.scores(m, "MI") # Multiple Imputation Call: ltm(formula = Abortion ~ z1) Scoring Method: Multiple Imputation # Imputations: 5 Factor-Scores for observed response patterns: Pattern Obs Exp z1 se.z1 1 0000 103 102.73 0.897 0.479 2 0001 13 16.83 0.499 0.283 3 0010 10 12.41 0.374 0.254 4 0011 21 14.12 0.180 0.245 5 0100 9 9.40 0.415 0.273 6 0101 6 7.02 0.220 0.256 7 0110 7 11.84 0.109 0.253 8 0111 44 41.01 -0.118 0.288 9 1000 1 1.66 0.429 0.262 10 1011 6 6.59 -0.100 0.276 11 1100 3 0.90 0.159 0.256 12 1101 3 2.22 -0.049 0.281 13 1110 12 7.10 -0.196 0.303 14 1111 141 142.02 -0.677 0.530 > > ## Factor Scores for the interaction model > m <- ltm(Wirs~z1*z2) > factor.scores(m, "EB") # Empirical Bayes Call: ltm(formula = Wirs ~ z1 * z2) Scoring Method: Empirical Bayes Factor-Scores for observed response patterns: Pattern Obs Exp z1 se.z1 z2 se.z2 1 000000 132 135.56 -1.038 0.588 0.541 0.783 2 000001 5 2.52 -0.060 0.641 -0.276 0.441 3 000010 17 11.29 0.088 0.606 -0.182 0.413 4 000100 13 14.19 -0.672 0.653 0.584 1.047 5 001000 12 8.25 0.012 0.637 -0.146 0.452 6 001001 1 0.67 0.537 0.571 -0.263 0.325 7 001010 2 3.71 0.654 0.559 -0.210 0.311 8 001011 2 0.85 1.108 0.564 -0.219 0.259 9 001100 1 1.76 0.354 0.591 -0.112 0.388 10 001110 1 1.53 0.954 0.559 -0.161 0.283 11 010000 172 167.87 -0.262 0.523 0.506 0.717 12 010001 4 7.16 0.274 0.508 0.235 0.504 13 010010 38 43.30 0.381 0.474 0.393 0.575 14 010011 11 6.75 0.842 0.478 0.324 0.496 15 010100 45 41.42 0.039 0.471 0.787 0.779 16 010101 1 2.57 0.549 0.460 0.450 0.602 17 010110 22 25.35 0.622 0.436 0.692 0.754 18 010111 8 7.01 1.104 0.470 0.618 0.701 19 011000 21 26.39 0.254 0.487 0.393 0.589 20 011001 2 2.88 0.733 0.485 0.251 0.457 21 011010 28 26.57 0.816 0.475 0.382 0.544 22 011011 11 11.49 1.314 0.513 0.385 0.516 23 011100 13 13.03 0.489 0.453 0.631 0.733 24 011101 3 2.44 0.982 0.483 0.438 0.583 25 011110 35 30.73 1.041 0.473 0.669 0.756 26 011111 30 30.66 1.607 0.540 0.744 0.762 27 100000 65 70.48 -0.058 0.610 -0.843 0.540 28 100001 11 11.58 0.145 0.685 -1.097 0.687 29 100010 34 37.02 0.368 0.659 -0.852 0.541 30 100011 10 9.21 0.701 0.741 -0.829 0.579 31 100100 20 9.49 0.262 0.617 -0.697 0.456 32 100101 1 1.77 0.603 0.644 -0.757 0.473 33 100110 5 7.23 0.766 0.617 -0.637 0.392 34 100111 2 2.09 1.172 0.628 -0.580 0.343 35 101000 24 25.78 0.478 0.639 -0.863 0.522 36 101001 8 6.26 0.792 0.683 -0.886 0.562 37 101010 31 24.57 0.974 0.640 -0.724 0.436 38 101011 4 8.41 1.392 0.651 -0.622 0.362 39 101100 2 5.40 0.819 0.622 -0.690 0.415 40 101101 1 1.58 1.200 0.633 -0.654 0.382 41 101110 8 8.31 1.345 0.627 -0.575 0.326 42 101111 7 4.23 1.811 0.658 -0.496 0.264 43 110000 55 56.26 -0.523 0.924 -0.628 0.776 44 110001 10 6.73 -0.868 0.514 -1.478 0.686 45 110010 26 20.74 0.401 0.637 -0.302 0.378 46 110011 3 5.21 0.893 0.578 -0.236 0.289 47 110100 5 7.02 0.158 0.621 -0.250 0.403 48 110110 4 4.51 0.776 0.551 -0.176 0.297 49 110111 2 1.34 1.241 0.562 -0.147 0.255 50 111000 13 10.45 0.362 0.619 -0.318 0.372 51 111001 1 1.90 0.836 0.581 -0.274 0.295 52 111010 6 9.28 0.974 0.561 -0.217 0.273 53 111011 5 3.83 1.459 0.583 -0.174 0.237 54 111100 3 2.54 0.723 0.555 -0.206 0.301 55 111101 2 0.66 1.181 0.563 -0.188 0.255 56 111110 4 4.97 1.303 0.566 -0.150 0.249 57 111111 3 3.94 1.836 0.616 -0.112 0.226 > factor.scores(m, "MI") # Multiple Imputation Call: ltm(formula = Wirs ~ z1 * z2) Scoring Method: Multiple Imputation # Imputations: 5 Factor-Scores for observed response patterns: Pattern Obs Exp z1 se.z1 z2 se.z2 1 000000 132 135.56 -0.898 0.697 0.251 0.903 2 000001 5 2.52 -0.239 0.695 -0.707 0.920 3 000010 17 11.29 0.032 0.663 -0.325 0.578 4 000100 13 14.19 -0.512 0.886 0.364 1.165 5 001000 12 8.25 0.071 0.671 -0.296 0.516 6 001001 1 0.67 0.562 0.622 -0.388 0.456 7 001010 2 3.71 0.649 0.603 -0.313 0.391 8 001011 2 0.85 1.127 0.607 -0.299 0.327 9 001100 1 1.76 0.432 0.635 -0.229 0.440 10 001110 1 1.53 0.982 0.597 -0.254 0.346 11 010000 172 167.87 -0.207 0.537 0.495 0.745 12 010001 4 7.16 0.374 0.533 0.174 0.547 13 010010 38 43.30 0.387 0.508 0.378 0.634 14 010011 11 6.75 0.917 0.505 0.305 0.567 15 010100 45 41.42 0.090 0.499 0.818 0.813 16 010101 1 2.57 0.683 0.491 0.457 0.672 17 010110 22 25.35 0.648 0.469 0.705 0.797 18 010111 8 7.01 1.202 0.482 0.670 0.781 19 011000 21 26.39 0.308 0.515 0.366 0.635 20 011001 2 2.88 0.849 0.501 0.211 0.514 21 011010 28 26.57 0.840 0.493 0.343 0.598 22 011011 11 11.49 1.381 0.513 0.376 0.608 23 011100 13 13.03 0.558 0.492 0.645 0.775 24 011101 3 2.44 1.117 0.492 0.466 0.685 25 011110 35 30.73 1.070 0.487 0.633 0.781 26 011111 30 30.66 1.655 0.530 0.725 0.776 27 100000 65 70.48 -0.202 1.343 -0.714 1.390 28 100001 11 11.58 0.094 0.666 -1.202 0.725 29 100010 34 37.02 0.348 0.657 -0.903 0.570 30 100011 10 9.21 0.350 0.942 -1.292 0.975 31 100100 20 9.49 0.213 0.755 -0.653 0.606 32 100101 1 1.77 0.589 0.700 -0.846 0.555 33 100110 5 7.23 0.755 0.652 -0.704 0.435 34 100111 2 2.09 1.137 0.686 -0.680 0.399 35 101000 24 25.78 0.420 0.688 -0.913 0.557 36 101001 8 6.26 0.680 0.769 -1.004 0.683 37 101010 31 24.57 0.907 0.656 -0.820 0.486 38 101011 4 8.41 1.313 0.697 -0.721 0.420 39 101100 2 5.40 0.816 0.695 -0.756 0.457 40 101101 1 1.58 1.186 0.666 -0.725 0.417 41 101110 8 8.31 1.316 0.652 -0.666 0.363 42 101111 7 4.23 1.780 0.672 -0.580 0.289 43 110000 55 56.26 -0.394 0.779 -0.243 0.801 44 110001 10 6.73 0.068 0.859 -0.587 0.725 45 110010 26 20.74 0.371 0.616 -0.269 0.464 46 110011 3 5.21 0.877 0.600 -0.268 0.351 47 110100 5 7.02 0.084 0.688 -0.004 0.760 48 110110 4 4.51 0.726 0.586 -0.132 0.466 49 110111 2 1.34 1.227 0.583 -0.166 0.345 50 111000 13 10.45 0.317 0.660 -0.282 0.485 51 111001 1 1.90 0.854 0.591 -0.302 0.333 52 111010 6 9.28 0.922 0.569 -0.245 0.351 53 111011 5 3.83 1.434 0.593 -0.218 0.296 54 111100 3 2.54 0.685 0.621 -0.159 0.468 55 111101 2 0.66 1.211 0.584 -0.213 0.311 56 111110 4 4.97 1.252 0.595 -0.171 0.359 57 111111 3 3.94 1.808 0.623 -0.156 0.302 > > > > > cleanEx(); ..nameEx <- "ltm" > > ### * ltm > > flush(stderr()); flush(stdout()) > > ### Name: ltm > ### Title: Latent Trait Model - Latent Variable Model for Binary Data > ### Aliases: ltm > ### Keywords: multivariate regression > > ### ** Examples > > ## The two-parameter logistic model for the WIRS data > ltm(Wirs~z1) Call: ltm(formula = Wirs ~ z1) Coefficients: (Intercept) z1 Item 1 -0.52 -0.15 Item 2 0.35 -0.37 Item 3 -1.39 -1.72 Item 4 -1.38 -1.01 Item 5 -0.97 -2.03 Item 6 -2.31 -1.37 Log.Lik: -3420.065 > > ## One-factor and a quadratic term > ## using the Mobility data > ltm(Mobility~z1+I(z1^2)) Call: ltm(formula = Mobility ~ z1 + I(z1^2)) Coefficients: (Intercept) z1 z1^2 Item 1 0.11 3.33 5.58 Item 2 -2.75 0.63 1.95 Item 3 -0.04 1.96 3.16 Item 4 -3.09 -0.27 2.86 Item 5 -5.96 -1.09 1.38 Item 6 -9.75 -9.56 -1.59 Item 7 -9.47 -4.71 0.40 Item 8 -4.93 -0.81 1.25 Log.Lik: -23127.96 > > ## Two-factor model with an interaction term > ## using the WIRS data > ltm(Wirs~z1*z2) Call: ltm(formula = Wirs ~ z1 * z2) Coefficients: (Intercept) z1 z2 z1:z2 Item 1 -1.10 -0.46 3.63 -1.45 Item 2 0.88 -0.95 -2.11 3.20 Item 3 -1.44 -1.80 0.20 0.48 Item 4 -1.47 -1.09 -0.60 0.30 Item 5 -1.05 -2.09 0.38 1.15 Item 6 -2.74 -1.69 0.89 1.07 Log.Lik: -3292.77 > > ## A two-factor model with the constraint that the loading > ## for the 3rd item and the 2nd factor equals 1 > ltm(Wirs~z1+z2, constraint = c(3,2,1)) Call: ltm(formula = Wirs ~ z1 + z2, constraint = c(3, 2, 1)) Coefficients: (Intercept) z1 z2 Item 1 -0.94 -1.84 -1.48 Item 2 0.54 0.56 1.70 Item 3 -1.40 -1.40 1.00 Item 4 -1.47 -0.42 1.16 Item 5 -0.97 -1.59 1.23 Item 6 -2.39 -1.29 0.76 Log.Lik: -3341.547 > > ## The two-parameter logistic model for the Abortion data > ## with 20 quadrature points and 20 EM iterations > ltm(Abortion~z1, control = list(GHk=20, iter.em=20)) Call: ltm(formula = Abortion ~ z1, control = list(GHk = 20, iter.em = 20)) Coefficients: (Intercept) z1 Item 1 -0.71 -4.12 Item 2 1.13 -4.51 Item 3 2.23 -6.30 Item 4 1.16 -3.47 Log.Lik: -707.037 > > > > > cleanEx(); ..nameEx <- "margins" > > ### * margins > > flush(stderr()); flush(stdout()) > > ### Name: margins > ### Title: Fit on the margins > ### Aliases: margins > ### Keywords: multivariate > > ### ** Examples > > ## Two- and Three-way residuals for the Rasch model > m <- rasch(Lsat) > margins(m) Fit on the Two-Way Margins Response: (0,0) Item i Item j Obs Exp (O-E)^2/E 1 1 3 47 42.47 0.48 2 1 5 12 14.55 0.45 3 2 4 81 87.21 0.44 Response: (1,0) Item i Item j Obs Exp (O-E)^2/E 1 3 5 63 58.48 0.35 2 2 4 156 149.79 0.26 3 4 5 85 88.44 0.13 Response: (0,1) Item i Item j Obs Exp (O-E)^2/E 1 1 3 29 33.53 0.61 2 2 4 210 203.79 0.19 3 1 5 64 61.45 0.11 Response: (1,1) Item i Item j Obs Exp (O-E)^2/E 1 2 4 553 559.21 0.07 2 3 5 490 494.53 0.04 3 1 3 524 519.47 0.04 `***' denotes a chi-squared residual greater than 3.5 > margins(m, "three") Fit on the Three-Way Margins Response: (0,0,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 3 5 6 9.40 1.23 2 3 4 5 30 25.85 0.67 3 1 2 3 22 18.55 0.64 Response: (1,0,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 2 4 5 28 22.75 1.21 2 2 3 4 81 74.44 0.58 3 1 4 5 40 35.59 0.55 Response: (0,1,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 5 3 7.58 2.76 2 1 3 4 5 9.21 1.92 3 3 4 5 37 45.68 1.65 Response: (1,1,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 2 4 5 51 57.49 0.73 2 3 4 5 48 42.75 0.64 3 1 2 4 144 136.39 0.42 Response: (0,0,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 3 5 41 33.07 1.90 2 2 3 4 108 101.28 0.45 3 1 2 3 9 11.20 0.43 Response: (1,0,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 2 3 4 210 218.91 0.36 2 1 2 4 190 185.56 0.11 3 1 3 4 289 293.44 0.07 Response: (0,1,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 3 5 23 28.38 1.02 2 1 4 5 46 42.51 0.29 3 1 2 5 42 38.67 0.29 Response: (1,1,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 4 520 526.36 0.08 2 1 2 3 398 393.30 0.06 3 3 4 5 397 400.05 0.02 `***' denotes a chi-squared residual greater than 3.5 > > ## Two- and Three-way residuals for the two-factor model > m <- ltm(Wirs~z1+z2) > margins(m) Fit on the Two-Way Margins Response: (0,0) Item i Item j Obs Exp (O-E)^2/E 1 3 4 593 586.62 0.07 2 1 2 186 183.12 0.05 3 2 6 367 363.22 0.04 Response: (1,0) Item i Item j Obs Exp (O-E)^2/E 1 3 4 171 176.48 0.17 2 1 3 253 249.98 0.04 3 3 6 204 201.30 0.04 Response: (0,1) Item i Item j Obs Exp (O-E)^2/E 1 2 3 104 97.33 0.46 2 3 4 128 134.71 0.33 3 1 3 162 157.38 0.14 Response: (1,1) Item i Item j Obs Exp (O-E)^2/E 1 3 4 113 107.19 0.32 2 1 4 69 73.22 0.24 3 2 3 180 186.34 0.22 `***' denotes a chi-squared residual greater than 3.5 > margins(m, "three") Fit on the Three-Way Margins Response: (0,0,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 5 164 142.40 3.28 2 1 2 4 171 154.81 1.69 3 1 2 3 167 151.55 1.57 Response: (1,0,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 5 132 151.60 2.53 2 1 2 3 148 166.87 2.13 3 1 2 4 187 200.01 0.85 Response: (0,1,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 3 5 53 63.65 1.78 2 2 3 4 84 72.90 1.69 3 1 2 5 261 282.67 1.66 Response: (1,1,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 3 105 83.11 5.76 *** 2 1 2 5 89 69.66 5.37 *** 3 2 3 4 87 103.59 2.66 Response: (0,0,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 5 22 40.72 8.61 *** 2 1 2 4 15 28.31 6.26 *** 3 1 2 3 19 31.57 5.00 *** Response: (1,0,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 5 6 34 22.08 6.43 *** 2 1 2 3 85 65.76 5.63 *** 3 1 2 4 46 32.62 5.49 *** Response: (0,1,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 5 6 62 48.56 3.72 *** 2 1 3 4 83 68.03 3.29 3 1 3 5 109 93.73 2.49 Response: (1,1,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 3 37 60.54 9.15 *** 2 1 2 4 23 40.60 7.63 *** 3 1 2 5 53 73.99 5.95 *** `***' denotes a chi-squared residual greater than 3.5 > > ## Two- and Three-way residuals for the interaction model > m <- ltm(Wirs~z1*z2) > margins(m, rule=3, nprint=2) Fit on the Two-Way Margins Response: (0,0) Item i Item j Obs Exp (O-E)^2/E 1 1 2 186 179.98 0.20 2 2 3 315 319.67 0.07 Response: (1,0) Item i Item j Obs Exp (O-E)^2/E 1 5 6 261 256.83 0.07 2 3 6 204 200.80 0.05 Response: (0,1) Item i Item j Obs Exp (O-E)^2/E 1 2 3 104 96.64 0.56 2 5 6 50 46.59 0.25 Response: (1,1) Item i Item j Obs Exp (O-E)^2/E 1 2 3 180 186.25 0.21 2 1 2 142 138.13 0.11 `***' denotes a chi-squared residual greater than 3 > margins(m, "three", rule=3, nprint=2) Fit on the Three-Way Margins Response: (0,0,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 4 171 160.76 0.65 2 1 2 5 164 155.12 0.51 Response: (1,0,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 3 148 159.06 0.77 2 1 2 5 132 140.30 0.49 Response: (0,1,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 2 3 4 84 75.27 1.01 2 2 3 6 81 73.07 0.86 Response: (1,1,0) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 3 105 90.73 2.24 2 1 2 5 89 77.65 1.66 Response: (0,0,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 5 6 16 20.60 1.03 2 1 2 4 15 19.22 0.93 Response: (1,0,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 5 6 34 25.99 2.47 2 1 3 4 39 32.95 1.11 Response: (0,1,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 2 5 6 25 29.41 0.66 2 1 3 5 109 101.20 0.60 Response: (1,1,1) Item i Item j Item k Obs Exp (O-E)^2/E 1 1 2 3 37 47.40 2.28 2 1 5 6 36 43.07 1.16 `***' denotes a chi-squared residual greater than 3 > > > > > cleanEx(); ..nameEx <- "plot.ltm" > > ### * plot.ltm > > flush(stderr()); flush(stdout()) > > ### Name: plot.ltm > ### Title: Plot method for ltm objects > ### Aliases: plot.ltm > ### Keywords: methods multivariate > > ### ** Examples > > > ## Item Characteristic Curves for the one-factor model: > m <- ltm(Wirs~z1) > plot(m) > > ## Not run: > ##D ## because of an error during R CMD CHECK; you can run it. > ##D ## Item Characteristic Surfaces for the interaction model: > ##D m <- ltm(Wirs~z1*z2) > ##D plot(m) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "plot.rasch" > > ### * plot.rasch > > flush(stderr()); flush(stdout()) > > ### Name: plot.rasch > ### Title: Plot method for rasch objects > ### Aliases: plot.rasch > ### Keywords: methods multivariate > > ### ** Examples > > > ## Item Characteristic Curves for the Wirs data: > m <- rasch(Wirs) > plot(m) > > ## Item Characteristic Curves for the Lsat data: > m <- rasch(Lsat) > plot(m, cx=1.5, cy=0.4) > > > > > cleanEx(); ..nameEx <- "rasch" > > ### * rasch > > flush(stderr()); flush(stdout()) > > ### Name: rasch > ### Title: Rasch Model > ### Aliases: rasch > ### Keywords: multivariate regression > > ### ** Examples > > > ## The Rasch model for the Wirs data: > rasch(Wirs) Call: rasch(data = Wirs) Coefficients: beta.i beta Item 1 -0.59 0.79 Item 2 0.38 0.79 Item 3 -1.06 0.79 Item 4 -1.30 0.79 Item 5 -0.67 0.79 Item 6 -1.96 0.79 Log.Lik: -3509.279 > > ## The Rasch model for the Wirs data, under the > ## constraint that: (i) the easiness parameter > ## for the first item equals 0.5, (ii) the easiness > ## parameter for the second item equals 1.2, and > ## (iii) the discrimination parameter equals 1 > (constr <- rbind(c(1, 0.5), c(2, 1.2), c(7, 1))) [,1] [,2] [1,] 1 0.5 [2,] 2 1.2 [3,] 7 1.0 > rasch(Wirs, constraint = constr) Call: rasch(data = Wirs, constraint = constr) Coefficients: beta.i beta Item 1 0.50 1 Item 2 1.20 1 Item 3 -0.83 1 Item 4 -1.09 1 Item 5 -0.43 1 Item 6 -1.78 1 Log.Lik: -3654.935 > > ## The Rasch model for the Lsat data: > rasch(Lsat) Call: rasch(data = Lsat) Coefficients: beta.i beta Item 1 2.73 0.76 Item 2 1.00 0.76 Item 3 0.24 0.76 Item 4 1.31 0.76 Item 5 2.10 0.76 Log.Lik: -2466.938 > > ## The Rasch model for the Lsat data, under the > ## constraint that the discrimination parameter > ## equals 1 > rasch(Lsat, constraint = rbind(c(6,1))) Call: rasch(data = Lsat, constraint = rbind(c(6, 1))) Coefficients: beta.i beta Item 1 2.87 1 Item 2 1.06 1 Item 3 0.26 1 Item 4 1.39 1 Item 5 2.22 1 Log.Lik: -2473.054 > > ## The Rasch model for the Abortion data: > rasch(Abortion) Call: rasch(data = Abortion) Coefficients: beta.i beta Item 1 -0.79 4.36 Item 2 1.03 4.36 Item 3 1.56 4.36 Item 4 1.32 4.36 Log.Lik: -709.824 > > > > > cleanEx(); ..nameEx <- "summary.ltm" > > ### * summary.ltm > > flush(stderr()); flush(stdout()) > > ### Name: summary.ltm > ### Title: Summary method for ltm objects > ### Aliases: summary.ltm > ### Keywords: methods multivariate > > ### ** Examples > > > ## One factor model using the WIRS data > m <- ltm(Wirs~z1) > summary(m) Call: ltm(formula = Wirs ~ z1) Model Summary: log.Lik AIC BIC -3420.065 6864.129 6923.082 Coefficients: value std.error z.value (Intercept).1 -0.5218 0.0657 -7.944 (Intercept).2 0.3464 0.0663 5.228 (Intercept).3 -1.3910 0.1428 -9.738 (Intercept).4 -1.3829 0.1027 -13.464 (Intercept).5 -0.9675 0.1408 -6.870 (Intercept).6 -2.3100 0.1685 -13.709 z1.1 -0.1534 0.0940 -1.633 z1.2 -0.3677 0.0990 -3.716 z1.3 -1.7187 0.2400 -7.160 z1.4 -1.0102 0.1415 -7.138 z1.5 -2.0313 0.3228 -6.293 z1.6 -1.3746 0.1902 -7.226 Integration: method: Gauss-Hermite quadrature points: 15 Optimization: Convergence: 0 max(|grad|): 0.033 quasi-Newton: BFGS > summary(m, TRUE) Call: ltm(formula = Wirs ~ z1) Model Summary: log.Lik AIC BIC -3420.065 6864.129 6923.082 Coefficients: value std.error z.value (Intercept).1 -0.5218 0.0655 -7.965 (Intercept).2 0.3464 0.0667 5.193 (Intercept).3 -1.3910 0.1462 -9.514 (Intercept).4 -1.3829 0.1057 -13.085 (Intercept).5 -0.9675 0.1450 -6.674 (Intercept).6 -2.3100 0.1732 -13.335 z1.1 -0.1534 0.1144 -1.342 z1.2 -0.3677 0.1211 -3.035 z1.3 -1.7187 0.2456 -6.999 z1.4 -1.0102 0.1580 -6.394 z1.5 -2.0313 0.3288 -6.178 z1.6 -1.3746 0.1950 -7.050 Integration: method: Gauss-Hermite quadrature points: 15 Optimization: Convergence: 0 max(|grad|): 0.033 quasi-Newton: BFGS > > > > > cleanEx(); ..nameEx <- "summary.rasch" > > ### * summary.rasch > > flush(stderr()); flush(stdout()) > > ### Name: summary.rasch > ### Title: Summary method for rasch objects > ### Aliases: summary.rasch > ### Keywords: methods multivariate > > ### ** Examples > > > ## The Rasch model for the Wirs data: > m <- rasch(Wirs) > summary(m) Call: rasch(data = Wirs) Model Summary: log.Lik AIC BIC -3509.279 7032.558 7066.948 Coefficients: value std.error z.value beta.1 -0.5896 0.0743 -7.939 beta.2 0.3821 0.0729 5.244 beta.3 -1.0551 0.0795 -13.273 beta.4 -1.3027 0.0835 -15.600 beta.5 -0.6676 0.0749 -8.908 beta.6 -1.9631 0.0988 -19.865 beta 0.7940 0.0520 15.267 Integration: method: Gauss-Hermite quadrature points: 21 Optimization: Convergence: 0 max(|grad|): 0.038 quasi-Newton: BFGS > > ## The Rasch model for the Lsat data: > m <- rasch(Lsat, constraint = rbind(c(6,1))) > summary(m) Call: rasch(data = Lsat, constraint = rbind(c(6, 1))) Model Summary: log.Lik AIC BIC -2473.054 4958.108 4987.554 Coefficients: value std.error z.value beta.1 2.8720 0.1287 22.307 beta.2 1.0630 0.0821 12.946 beta.3 0.2576 0.0766 3.364 beta.4 1.3881 0.0865 16.048 beta.5 2.2188 0.1048 21.166 beta 1.0000 NA NA Integration: method: Gauss-Hermite quadrature points: 21 Optimization: Convergence: 0 max(|grad|): 0.00015 quasi-Newton: BFGS > > ## The Rasch model for the Abortion data: > m <- rasch(Abortion) > summary(m, TRUE) Call: rasch(data = Abortion) Model Summary: log.Lik AIC BIC -709.8235 1429.647 1449.335 Coefficients: value std.error z.value beta.1 -0.7887 0.2979 -2.647 beta.2 1.0312 0.2935 3.514 beta.3 1.5585 0.2993 5.206 beta.4 1.3249 0.3083 4.297 beta 4.3608 0.4108 10.615 Integration: method: Gauss-Hermite quadrature points: 21 Optimization: Convergence: 0 max(|grad|): 0.00056 quasi-Newton: BFGS > > > > > cleanEx(); ..nameEx <- "vcov.rasch" > > ### * vcov.rasch > > flush(stderr()); flush(stdout()) > > ### Name: vcov.rasch > ### Title: vcov method for rasch objects > ### Aliases: vcov.rasch > ### Keywords: methods multivariate > > ### ** Examples > > > m <- rasch(Wirs) > vcov(m) beta.1 beta.2 beta.3 beta.4 beta.5 beta.1 0.0055160256 0.0005906849 0.0007424719 0.0007650687 0.0007043099 beta.2 0.0005906849 0.0053090123 0.0005596546 0.0005439863 0.0005853854 beta.3 0.0007424719 0.0005596546 0.0063187744 0.0008639179 0.0007565443 beta.4 0.0007650687 0.0005439863 0.0008639179 0.0069729506 0.0007821494 beta.5 0.0007043099 0.0005853854 0.0007565443 0.0007821494 0.0056155912 beta.6 0.0008171894 0.0005065585 0.0009573254 0.0010269514 0.0008413441 beta -0.0003942829 0.0002446603 -0.0006815446 -0.0008241353 -0.0004438301 beta.6 beta beta.1 0.0008171894 -0.0003942829 beta.2 0.0005065585 0.0002446603 beta.3 0.0009573254 -0.0006815446 beta.4 0.0010269514 -0.0008241353 beta.5 0.0008413441 -0.0004438301 beta.6 0.0097652835 -0.0011588889 beta -0.0011588889 0.0027048583 > sqrt(diag(vcov(m))) # standard errors beta.1 beta.2 beta.3 beta.4 beta.5 beta.6 beta 0.07426995 0.07286297 0.07949072 0.08350420 0.07493725 0.09881945 0.05200825 > > > > ### *