R-code for ``On generalized degrees of freedom with application in linear mixed models selection'' by You, Mueller and Ormerod (2014, Statistics and Computing) - - - - - - - - - - - - - - - - - - - - - - - - - - - Code for ``Table 1-7'' - - - - - - - - - - - - - - - - - - - - - - - - - - - 1. Run Res.Rs - - - - - - - - - - - - - - - - - - - - - - - - - - - Code for ``Table 8'' Example 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - simulations : directory containing simulation study 1. (a) adp_new.Rs : main file to run study, (b) cAIC.Rs : function to generate $df_l$, (c) gdf-sel.Rs : function to generate $gdf_s$ and $gdf_{zhang}$, (d) LLfunction.Rs : function to find loglikelihood of all possible models. 2. In each setting, simulations are repeated 100 times. To save time, these 100 simulations are not done in one R window but done separately into 50 simulations in 2 R-windows using seed(1234) and seed(2345). Look at output.txt for a summary of the results. - - - - - - - - - - - - - - - - - - - - - - - - - - - Code for ``Table 9'' Example 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - simulations : directory containing simulation study 1. (a) adp_new.Rs : main file to run study, (b) cAIC.Rs : function to generate $df_l$, (c) gdf-sel.Rs : function to generate $gdf_s$ and $gdf_{zhang}$, (d) LLfunction.Rs : function to find loglikelihood of all possible models. 2. In each setting, simulations are repeated 100 times. To save time, these 100 simulations are not done in one R window but done separately into 50 simulations in 2 R-windows using seed(2345) and seed(3456). Look at output.txt for a summary of the results. - - - - - - - - - - - - - - - - - - - - - - - - - - - Code for ``Table 10'' Example 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - simulations : directory containing simulation study 1. (a) adp_new2.Rs : main file to run study, (b) cAIC.Rs : function to generate $df_l$, (c) gdf-sel-2.Rs : function to generate $gdf_s$ and $gdf_{zhang}$, (d) LLfunction.Rs : function to find loglikelihood of all possible models. 2. In each setting, simulations are repeated 100 times. To save time, these 100 simulations are not done in one R window but done separately in multiple R-windows with different seeds. To get the exact output from Table 10 in the paper, you need to set the simulations in the following way: (a). For case 1, we run 50 simulations with seed(1234) and seed(2345) respectively and combine the results togeter. (b). Similary for case 2, we run 20 simulation with seed(1234), seed(2345), seed(3456), seed(4567) and seed(5678) respectively and combine the results together (c). We run 30 simulations with seed(1234) and seed(2345) respectively and 20 simulations with seed(3456) and seed(4567) respectively. Look at output.txt for a summary of the results.