Skip to content

Commit

Permalink
test: split snapshot files
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindhebbali committed Nov 11, 2024
1 parent 66cfa21 commit 89506ee
Show file tree
Hide file tree
Showing 24 changed files with 690 additions and 700 deletions.
123 changes: 123 additions & 0 deletions tests/testthat/_snaps/backward-aic-details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# output is as expected when details == TRUE

Code
blr_step_aic_backward(model, details = TRUE)
Output
Backward Elimination Method
---------------------------
Candidate Terms:
1 . female
2 . read
3 . science
4 . math
5 . prog
6 . socst
Step 0: AIC = 162.4241
honcomp ~ female + read + science + math + prog + socst
-------------------------------------------------
Variable DF AIC BIC Deviance
-------------------------------------------------
prog 1 158.953 178.743 146.953
socst 1 160.745 183.834 146.745
read 1 163.394 186.482 149.394
science 1 163.815 186.903 149.815
female 1 169.570 192.658 155.570
math 1 170.017 193.105 156.017
-------------------------------------------------
x prog
Step 1 : AIC = 158.9527
honcomp ~ female + read + science + math + socst
-------------------------------------------------
Variable DF AIC BIC Deviance
-------------------------------------------------
socst 1 157.286 173.777 147.286
science 1 159.941 176.432 149.941
read 1 160.307 176.798 150.307
female 1 166.114 182.606 156.114
math 1 168.669 185.161 158.669
-------------------------------------------------
x socst
Step 2 : AIC = 157.2856
honcomp ~ female + read + science + math
-------------------------------------------------
Variable DF AIC BIC Deviance
-------------------------------------------------
science 1 158.420 171.613 150.420
read 1 160.658 173.851 152.658
female 1 164.988 178.181 156.988
math 1 168.236 181.430 160.236
-------------------------------------------------
No more variables to be removed.
Variables Removed:
- prog
- socst
Final Model Output
------------------
- Creating model overview.
- Creating response profile.
- Extracting maximum likelihood estimates.
- Estimating concordant and discordant pairs.
Model Overview
------------------------------------------------------------------------
Data Set Resp Var Obs. Df. Model Df. Residual Convergence
------------------------------------------------------------------------
data honcomp 200 199 195 TRUE
------------------------------------------------------------------------
Response Summary
--------------------------------------------------------
Outcome Frequency Outcome Frequency
--------------------------------------------------------
0 147 1 53
--------------------------------------------------------
Maximum Likelihood Estimates
-----------------------------------------------------------------
Parameter DF Estimate Std. Error z value Pr(>|z|)
-----------------------------------------------------------------
(Intercept) 1 -14.5773 2.1568 -6.7589 0.0000
female1 1 1.3622 0.4605 2.9580 0.0031
read 1 0.0631 0.0281 2.2455 0.0247
science 1 0.0569 0.0326 1.7429 0.0814
math 1 0.1113 0.0338 3.2992 0.0010
-----------------------------------------------------------------
Association of Predicted Probabilities and Observed Responses
---------------------------------------------------------------
% Concordant 0.8835 Somers' D 0.7669
% Discordant 0.1165 Gamma 0.7669
% Tied 0.0000 Tau-a 0.3003
Pairs 7791 c 0.8835
---------------------------------------------------------------
Backward Elimination Summary
--------------------------------------------
Variable AIC BIC Deviance
--------------------------------------------
Full Model 162.424 188.811 146.424
prog 158.953 178.743 146.953
socst 157.286 173.777 147.286
--------------------------------------------

17 changes: 17 additions & 0 deletions tests/testthat/_snaps/backward-aic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# output from backward variable elimination is as expected

Code
blr_step_aic_backward(model)
Output
Backward Elimination Summary
--------------------------------------------
Variable AIC BIC Deviance
--------------------------------------------
Full Model 162.424 188.811 146.424
prog 158.953 178.743 146.953
socst 157.286 173.777 147.286
--------------------------------------------

Loading

0 comments on commit 89506ee

Please sign in to comment.