Computes confidence intervals for one or more parameters of a fitted model.
Arguments
- object
an object of class
slcafit
.- parm
an integer or string specifying the parameters for which confidence intervals are to be computed.
- level
a numeric value representing the confidence level for the intervals. The default is
0.95
(95% confidence level).- type
a character string specifying the format in which the results should be returned. Options include
"probs"
for probability format and"logit"
for log-odds (logit) format, with the default being"probs"
.- ...
additional arguments.
Value
A matrix
with two columns representing the confidence intervals for the selected parameters. The column names correspond to the specified confidence level:
100 * (level / 2)%
: The lower bound of the confidence interval.100 * (1 - level / 2)%
: The upper bound of the confidence interval.
The level
argument determines the confidence level, with common values being 0.95
for a 95% confidence interval and 0.99
for a 99% confidence interval.
Examples
param(nlsy_jlcpa, index = TRUE)
#> PI :
#> (PROF)
#> class
#> 1 2 3 4
#> 0.2790 (1) 0.2146 (2) 0.2869 (3) 0.2195 (4)
#>
#> TAU :
#> (A)
#> parent
#> child 1 2 3 4
#> 1 0.0000 (5) 0.0000 (10) 0.1745 (15) 0.0000 (20)
#> 2 0.0901 (6) 0.4456 (11) 0.1939 (16) 0.0403 (21)
#> 3 0.3771 (7) 0.1675 (12) 0.1825 (17) 0.7018 (22)
#> 4 0.2620 (8) 0.0000 (13) 0.0000 (18) 0.0813 (23)
#> 5 0.2709 (9) 0.3869 (14) 0.4491 (19) 0.1766 (24)
#>
#> parent PROF
#> child SUB_98
#> (B)
#> parent
#> child 1 2 3 4
#> 1 0.0000 (25) 0.0114 (30) 0.8719 (35) 0.0000 (40)
#> 2 0.0000 (26) 0.9617 (31) 0.0000 (36) 0.0079 (41)
#> 3 0.0000 (27) 0.0000 (32) 0.0965 (37) 0.9210 (42)
#> 4 0.9941 (28) 0.0000 (33) 0.0000 (38) 0.0711 (43)
#> 5 0.0059 (29) 0.0269 (34) 0.0316 (39) 0.0000 (44)
#>
#> parent PROF
#> child SUB_03
#> (C)
#> parent
#> child 1 2 3 4
#> 1 0.0019 (45) 0.1821 (50) 0.8024 (55) 0.0319 (60)
#> 2 0.0097 (46) 0.7202 (51) 0.0000 (56) 0.0000 (61)
#> 3 0.0573 (47) 0.0442 (52) 0.1844 (57) 0.7168 (62)
#> 4 0.9311 (48) 0.0356 (53) 0.0084 (58) 0.2473 (63)
#> 5 0.0000 (49) 0.0179 (54) 0.0048 (59) 0.0040 (64)
#>
#> parent PROF
#> child SUB_08
#> (D)
#> parent
#> child 1 2 3 4 5
#> 1 0.0254 (65) 0.0457 (68) 0.9505 (71) 0.7958 (74) 0.1613 (77)
#> 2 0.7516 (66) 0.6690 (69) 0.0051 (72) 0.0000 (75) 0.1631 (78)
#> 3 0.2230 (67) 0.2853 (70) 0.0444 (73) 0.2042 (76) 0.6755 (79)
#>
#> parent SUB_98 SUB_03 SUB_08
#> child SMK_98 SMK_03 SMK_08
#> (E)
#> parent
#> child 1 2 3 4 5
#> 1 0.5664 (80) 0.8533 (83) 0.0335 (86) 0.7521 (89) 0.2872 (92)
#> 2 0.2229 (81) 0.1264 (84) 0.2589 (87) 0.2414 (90) 0.6127 (93)
#> 3 0.2107 (82) 0.0203 (85) 0.7075 (88) 0.0065 (91) 0.1001 (94)
#>
#> parent SUB_98 SUB_03 SUB_08
#> child DRK_98 DRK_03 DRK_08
#> (F)
#> parent
#> child 1 2 3 4 5
#> 1 0.0871 (95) 0.1442 (98) 0.0317 (101) 0.1525 (104) 0.7278 (107)
#> 2 0.0617 (96) 0.8387 (99) 0.0095 (102) 0.2302 (105) 0.1258 (108)
#> 3 0.8512 (97) 0.0170 (100) 0.9588 (103) 0.6173 (106) 0.1463 (109)
#>
#> parent SUB_98 SUB_03 SUB_08
#> child MRJ_98 MRJ_03 MRJ_08
#>
#> RHO :
#> (a)
#> class
#> response 1 2 3
#> 1(V1) 0.0134 (110) 1.0000 (118) 1.0000 (126)
#> 2 0.9866 (111) 0.0000 (119) 0.0000 (127)
#> 1(V2) 0.0000 (112) 1.0000 (120) 0.6701 (128)
#> 2 1.0000 (113) 0.0000 (121) 0.3299 (129)
#> 1(V3) 0.0000 (114) 0.8833 (122) 0.0000 (130)
#> 2 1.0000 (115) 0.1167 (123) 1.0000 (131)
#> 1(V4) 0.0000 (116) 0.6460 (124) 0.0000 (132)
#> 2 1.0000 (117) 0.3540 (125) 1.0000 (133)
#>
#> V1 V2 V3 V4
#> SMK_98 ESMK_98 FSMK_98 DSMK_98 HSMK_98
#> SMK_03 ESMK_03 FSMK_03 DSMK_03 HSMK_03
#> SMK_08 ESMK_08 FSMK_08 DSMK_08 HSMK_08
#> (b)
#> class
#> response 1 2 3
#> 1(V1) 1.0000 (134) 1.0000 (142) 0.0759 (150)
#> 2 0.0000 (135) 0.0000 (143) 0.9241 (151)
#> 1(V2) 1.0000 (136) 0.5760 (144) 0.0000 (152)
#> 2 0.0000 (137) 0.4240 (145) 1.0000 (153)
#> 1(V3) 0.6934 (138) 0.0000 (146) 0.0000 (154)
#> 2 0.3066 (139) 1.0000 (147) 1.0000 (155)
#> 1(V4) 0.8061 (140) 0.0000 (148) 0.0000 (156)
#> 2 0.1939 (141) 1.0000 (149) 1.0000 (157)
#>
#> V1 V2 V3 V4
#> DRK_98 EDRK_98 CDRK_98 WDRK_98 BDRK_98
#> DRK_03 EDRK_03 CDRK_03 WDRK_03 BDRK_03
#> DRK_08 EDRK_08 CDRK_08 WDRK_08 BDRK_08
#> (c)
#> class
#> response 1 2 3
#> 1(V1) 0.5189 (158) 1.0000 (166) 0.0002 (174)
#> 2 0.4811 (159) 0.0000 (167) 0.9998 (175)
#> 1(V2) 0.0000 (160) 1.0000 (168) 0.0000 (176)
#> 2 1.0000 (161) 0.0000 (169) 1.0000 (177)
#> 1(V3) 0.0000 (162) 0.5259 (170) 0.0000 (178)
#> 2 1.0000 (163) 0.4741 (171) 1.0000 (179)
#> 1(V4) 0.0000 (164) 0.3720 (172) 0.0000 (180)
#> 2 1.0000 (165) 0.6280 (173) 1.0000 (181)
#>
#> V1 V2 V3 V4
#> MRJ_98 EMRJ_98 CMRJ_98 OMRJ_98 SMRJ_98
#> MRJ_03 EMRJ_03 CMRJ_03 OMRJ_03 SMRJ_03
#> MRJ_08 EMRJ_08 CMRJ_08 OMRJ_08 SMRJ_08
confint(nlsy_jlcpa)
#> Error in MASS::ginv(hess[!nan, !nan]): 'X' must be a numeric or complex matrix
confint(nlsy_jlcpa, 1:4)
#> Error in MASS::ginv(hess[!nan, !nan]): 'X' must be a numeric or complex matrix