R Under development (unstable) (2024-03-16 r86144 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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 an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(packDAMipd) > > test_check("packDAMipd") [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead Call: lm(formula = gre ~ gpa, data = dataset) Residuals: Min 1Q Median 3Q Max -302.394 -62.789 -2.206 68.506 283.438 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 192.30 47.92 4.013 7.15e-05 *** gpa 116.64 14.05 8.304 1.60e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 106.8 on 398 degrees of freedom Multiple R-squared: 0.1477, Adjusted R-squared: 0.1455 F-statistic: 68.95 on 1 and 398 DF, p-value: 1.596e-15 ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM: Level of Significance = 0.05 Call: gvlma::gvlma(x = fit) Value p-value Decision Global Stat 2.7853 0.5944 Assumptions acceptable. Skewness 0.1510 0.6975 Assumptions acceptable. Kurtosis 0.9735 0.3238 Assumptions acceptable. Link Function 0.3578 0.5497 Assumptions acceptable. Heteroscedasticity 1.3030 0.2537 Assumptions acceptable. [1] "i= 1 and j = 1" [1] "i= 1 and j = 2" [1] "i= 2 and j = 1" [1] "i= 2 and j = 2" [1] "i= 3 and j = 1" [1] "i= 3 and j = 2" $stats [,1] [,2] [1,] 35.62186 37.20490 [2,] 47.35844 48.63362 [3,] 52.71848 51.79091 [4,] 55.90675 58.49112 [5,] 63.60830 65.19133 $n [1] 109 91 $conf [,1] [,2] [1,] 51.42481 50.15822 [2,] 54.01215 53.42360 $out numeric(0) $group numeric(0) $names [1] "female" "male" Call: lm(formula = admit ~ gpa, data = dataset) Residuals: Min 1Q Median 3Q Max -0.4507 -0.3312 -0.2531 0.5908 0.8942 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.42238 0.20606 -2.050 0.041037 * gpa 0.21826 0.06041 3.613 0.000341 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4592 on 398 degrees of freedom Multiple R-squared: 0.03176, Adjusted R-squared: 0.02933 F-statistic: 13.05 on 1 and 398 DF, p-value: 0.0003412 ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM: Level of Significance = 0.05 Call: gvlma::gvlma(x = fit) Value p-value Decision Global Stat 66.0026 1.582e-13 Assumptions NOT satisfied! Skewness 37.1456 1.096e-09 Assumptions NOT satisfied! Kurtosis 28.0492 1.183e-07 Assumptions NOT satisfied! Link Function 0.5683 4.509e-01 Assumptions acceptable. Heteroscedasticity 0.2394 6.247e-01 Assumptions acceptable. Start: AIC=6.76 expression ~ temperature + treatment Df Sum of Sq RSS AIC - treatment 4 5.255 25.529 4.523 20.274 6.762 - temperature 1 40.306 60.581 32.127 Step: AIC=4.52 expression ~ temperature Df Sum of Sq RSS AIC 25.529 4.523 + treatment 4 5.255 20.274 6.762 - temperature 1 219.509 245.038 59.063 Call: lm(formula = expression ~ temperature + treatment, data = dataset) Residuals: Min 1Q Median 3Q Max -2.3417 -0.5409 0.0743 0.5725 1.6273 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -8.0714 1.5734 -5.130 5.95e-05 *** temperature 0.8168 0.1329 6.146 6.59e-06 *** treatmentB 0.2796 0.6539 0.428 0.674 treatmentC 0.4602 0.6573 0.700 0.492 treatmentD 1.3629 0.6814 2.000 0.060 . treatmentE 1.7445 1.1304 1.543 0.139 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.033 on 19 degrees of freedom Multiple R-squared: 0.9173, Adjusted R-squared: 0.8955 F-statistic: 42.13 on 5 and 19 DF, p-value: 1.232e-09 ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM: Level of Significance = 0.05 Call: gvlma::gvlma(x = fit) Value p-value Decision Global Stat 11.02282 0.02631 Assumptions NOT satisfied! Skewness 0.44187 0.50622 Assumptions acceptable. Kurtosis 0.01247 0.91109 Assumptions acceptable. Link Function 9.42560 0.00214 Assumptions NOT satisfied! Heteroscedasticity 1.14288 0.28504 Assumptions acceptable. Start: AIC=486.34 admit ~ gpa + gre Df Deviance AIC 480.34 486.34 - gpa 1 486.06 490.06 - gre 1 486.97 490.97 [1] "i= 1 and j = 1" [1] "i= 1 and j = 2" [1] "i= 2 and j = 1" [1] "i= 2 and j = 2" [1] "i= 3 and j = 1" [1] "i= 3 and j = 2" [1] "i= 1 and j = 1" [1] "i= 1 and j = 2" [1] "i= 2 and j = 1" [1] "i= 2 and j = 2" [1] "i= 3 and j = 1" [1] "i= 3 and j = 2" [1] "i= 1 and j = 1" [1] "i= 1 and j = 2" [1] "i= 2 and j = 1" [1] "i= 2 and j = 2" [1] "i= 3 and j = 1" [1] "i= 3 and j = 2" [1] "i= 1 and j = 1" [1] "i= 1 and j = 2" [1] "i= 2 and j = 1" [1] "i= 2 and j = 2" [1] "i= 3 and j = 1" [1] "i= 3 and j = 2" [1] "i= 1 and j = 1" [1] "i= 1 and j = 2" NULL NULL [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_well_to_dead2 1 well 4 dead2 5: 5 prob_disabled_to_disabled 2 disabled 2 disabled 6: 6 prob_disabled_to_dead 2 disabled 3 dead 7: 7 prob_disabled_to_dead2 2 disabled 4 dead2 8: 8 prob_dead_to_dead 3 dead 3 dead 9: 9 prob_dead_to_dead2 3 dead 4 dead2 10: 10 prob_dead2_to_dead2 4 dead2 4 dead2 [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_well_to_well 1 well 1 well 2: 2 prob_well_to_disabled 1 well 2 disabled 3: 3 prob_well_to_dead 1 well 3 dead 4: 4 prob_disabled_to_disabled 2 disabled 2 disabled 5: 5 prob_disabled_to_dead 2 disabled 3 dead 6: 6 prob_dead_to_dead 3 dead 3 dead [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_B_to_B 2 B 2 B 5: 5 prob_B_to_C 2 B 3 C 6: 6 prob_C_to_C 3 C 3 C [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_B_to_B 2 B 2 B 5: 5 prob_B_to_C 2 B 3 C 6: 6 prob_C_to_C 3 C 3 C [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_B_to_B 2 B 2 B 5: 5 prob_B_to_C 2 B 3 C 6: 6 prob_C_to_C 3 C 3 C [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_A_to_D 1 A 4 D 5: 5 prob_B_to_B 2 B 2 B 6: 6 prob_B_to_C 2 B 3 C 7: 7 prob_B_to_D 2 B 4 D 8: 8 prob_C_to_C 3 C 3 C 9: 9 prob_C_to_D 3 C 4 D 10: 10 prob_D_to_D 4 D 4 D [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_B_to_B 2 B 2 B 5: 5 prob_B_to_C 2 B 3 C 6: 6 prob_C_to_C 3 C 3 C [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_B_to_B 2 B 2 B 5: 5 prob_B_to_C 2 B 3 C 6: 6 prob_C_to_C 3 C 3 C [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_B_to_B 2 B 2 B 5: 5 prob_B_to_C 2 B 3 C 6: 6 prob_C_to_C 3 C 3 C [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_A_to_A 1 A 1 A 2: 2 prob_A_to_B 1 A 2 B 3: 3 prob_A_to_C 1 A 3 C 4: 4 prob_B_to_B 2 B 2 B 5: 5 prob_B_to_C 2 B 3 C 6: 6 prob_C_to_C 3 C 3 C [1] "The transition matrix as explained" transition number probability name from from state to to state 1: 1 prob_Healthy_to_Healthy 1 Healthy 1 Healthy 2: 2 prob_Healthy_to_Dead 1 Healthy 2 Dead 3: 3 prob_Dead_to_Healthy 2 Dead 1 Healthy 4: 4 prob_Dead_to_Dead 2 Dead 2 Dead [1] "For the distributions other than gamma,the code is not equipped to\n estimate the parameters" [1] "For the distributions other than gamma,the code is not equipped to\n estimate the parameters" Call: lm(formula = admit ~ gre, data = dataset) Residuals: Min 1Q Median 3Q Max -0.4755 -0.3415 -0.2522 0.5989 0.8966 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.1198407 0.1190510 -1.007 0.314722 gre 0.0007442 0.0001988 3.744 0.000208 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4587 on 398 degrees of freedom Multiple R-squared: 0.03402, Adjusted R-squared: 0.03159 F-statistic: 14.02 on 1 and 398 DF, p-value: 0.0002081 ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM: Level of Significance = 0.05 Call: gvlma::gvlma(x = fit) Value p-value Decision Global Stat 65.312437 2.212e-13 Assumptions NOT satisfied! Skewness 36.445627 1.570e-09 Assumptions NOT satisfied! Kurtosis 28.227938 1.078e-07 Assumptions NOT satisfied! Link Function 0.002174 9.628e-01 Assumptions acceptable. Heteroscedasticity 0.636699 4.249e-01 Assumptions acceptable. Call: lm(formula = admit ~ gre, data = dataset) Residuals: Min 1Q Median 3Q Max -0.4755 -0.3415 -0.2522 0.5989 0.8966 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.1198407 0.1190510 -1.007 0.314722 gre 0.0007442 0.0001988 3.744 0.000208 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4587 on 398 degrees of freedom Multiple R-squared: 0.03402, Adjusted R-squared: 0.03159 F-statistic: 14.02 on 1 and 398 DF, p-value: 0.0002081 ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM: Level of Significance = 0.05 Call: gvlma::gvlma(x = fit) Value p-value Decision Global Stat 65.312437 2.212e-13 Assumptions NOT satisfied! Skewness 36.445627 1.570e-09 Assumptions NOT satisfied! Kurtosis 28.227938 1.078e-07 Assumptions NOT satisfied! Link Function 0.002174 9.628e-01 Assumptions acceptable. Heteroscedasticity 0.636699 4.249e-01 Assumptions acceptable. Start: AIC=65.77 mpg ~ hp + wt + drat + disp Df Sum of Sq RSS AIC - disp 1 0.844 183.68 63.919 182.84 65.772 - drat 1 12.153 194.99 65.831 - hp 1 60.916 243.75 72.974 - wt 1 70.508 253.35 74.209 Step: AIC=63.92 mpg ~ hp + wt + drat Df Sum of Sq RSS AIC - drat 1 11.366 195.05 63.840 183.68 63.919 + disp 1 0.844 182.84 65.772 - hp 1 85.559 269.24 74.156 - wt 1 107.771 291.45 76.693 Step: AIC=63.84 mpg ~ hp + wt Df Sum of Sq RSS AIC 195.05 63.840 + drat 1 11.366 183.68 63.919 + disp 1 0.057 194.99 65.831 - hp 1 83.274 278.32 73.217 - wt 1 252.627 447.67 88.427 Call: lm(formula = mpg ~ hp + wt + drat + disp, data = dataset) Residuals: Min 1Q Median 3Q Max -3.5077 -1.9052 -0.5057 0.9821 5.6883 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 29.148738 6.293588 4.631 8.2e-05 *** hp -0.034784 0.011597 -2.999 0.00576 ** wt -3.479668 1.078371 -3.227 0.00327 ** drat 1.768049 1.319779 1.340 0.19153 disp 0.003815 0.010805 0.353 0.72675 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.602 on 27 degrees of freedom Multiple R-squared: 0.8376, Adjusted R-squared: 0.8136 F-statistic: 34.82 on 4 and 27 DF, p-value: 2.704e-10 ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM: Level of Significance = 0.05 Call: gvlma::gvlma(x = fit) Value p-value Decision Global Stat 13.93816 0.007495 Assumptions NOT satisfied! Skewness 4.31310 0.037820 Assumptions NOT satisfied! Kurtosis 0.01378 0.906542 Assumptions acceptable. Link Function 8.71658 0.003153 Assumptions NOT satisfied! Heteroscedasticity 0.89470 0.344207 Assumptions acceptable. [ FAIL 0 | WARN 1 | SKIP 0 | PASS 1185 ] [ FAIL 0 | WARN 1 | SKIP 0 | PASS 1185 ] > > proc.time() user system elapsed 82.43 4.75 87.31