Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.34 KB | None | 0 0
  1. lowest_AIC <- mixed_model(yield ~ stock,
  2. random = ~ 1 | groups,
  3. data = trees,
  4. family = hurdle.lognormal(), n_phis = 1,
  5. zi_fixed = ~ stock
  6. )
  7.  
  8. > AIC(lowest_AIC)
  9. [1] 2784.14
  10. > mean(residuals(lowest_AIC)^2)
  11. [1] 0.1474714
  12. > summary(lowest_AIC)
  13.  
  14. Call:
  15. mixed_model(fixed = yield ~ stock, random = ~1 | groups, data = trees,
  16. family = hurdle.lognormal(), zi_fixed = ~stock, n_phis = 1)
  17.  
  18. Data Descriptives:
  19. Number of Observations: 20583
  20. Number of Groups: 2
  21.  
  22. Model:
  23. family: hurdle log-normal
  24. link: identity
  25.  
  26. Fit statistics:
  27. log.Lik AIC BIC
  28. -1386.07 2784.14 2776.299
  29.  
  30. Random effects covariance matrix:
  31. StdDev
  32. (Intercept) 1.396311
  33.  
  34. Fixed effects:
  35. Estimate Std.Err z-value p-value
  36. (Intercept) 0.0004 0.0061 0.0731 0.94177
  37. stock -0.0907 0.0062 -14.7410 < 1e-04
  38.  
  39. Zero-part coefficients:
  40. Estimate Std.Err z-value p-value
  41. (Intercept) -2.4295 0.0257 -94.3862 < 1e-04
  42. stock 0.1934 0.0238 8.1089 < 1e-04
  43.  
  44. log(residual std. dev.):
  45. Estimate Std.Err
  46. -0.1746 0.0051
  47.  
  48. Integration:
  49. method: adaptive Gauss-Hermite quadrature rule
  50. quadrature points: 11
  51.  
  52. Optimization:
  53. method: EM
  54. converged: TRUE
  55.  
  56. best <- mixed_model(yield ~ stock + slope + precipitation + n_trees + soil_depth + rocks + position,
  57. random = ~ 1 | groups,
  58. data = trees,
  59. family = hurdle.lognormal(), n_phis = 1,
  60. zi_fixed = ~ stock + slope + precipitation + rocks + position,
  61. zi_random = ~ 1 | groups
  62.  
  63. )
  64.  
  65. > AIC(best)
  66. [1] 2839.902
  67. > mean(residuals(best)^2)
  68. [1] 0.1890385
  69. > summary(best)
  70.  
  71. Call:
  72. mixed_model(fixed = yield ~ stock + slope + precipitation + n_trees +
  73. soil_depth + rocks + position, random = ~1 | groups, data = trees,
  74. family = hurdle.lognormal(), zi_fixed = ~stock + slope +
  75. precipitation + rocks + position, zi_random = ~1 | groups,
  76. n_phis = 1)
  77.  
  78. Data Descriptives:
  79. Number of Observations: 20528
  80. Number of Groups: 2
  81.  
  82. Model:
  83. family: hurdle log-normal
  84. link: identity
  85.  
  86. Fit statistics:
  87. log.Lik AIC BIC
  88. -1387.951 2839.902 2798.083
  89.  
  90. Random effects covariance matrix:
  91. StdDev Corr
  92. (Intercept) 1.4117
  93. zi_(Intercept) 0.1331 0.0477
  94.  
  95. Fixed effects:
  96. Estimate Std.Err z-value p-value
  97. (Intercept) 0.4576 0.0176 25.9341 < 1e-04
  98. stock -0.0644 0.0059 -10.8639 < 1e-04
  99. slope -0.0593 0.0059 -10.1307 < 1e-04
  100. precipitation -0.0858 0.0061 -14.1035 < 1e-04
  101. n_trees -0.0630 0.0060 -10.5368 < 1e-04
  102. soil_depth 0.0590 0.0061 9.7462 < 1e-04
  103. rocks2 -0.0847 0.0155 -5.4514 < 1e-04
  104. rocks3 -0.0942 0.0178 -5.2897 < 1e-04
  105. rocks4 -0.1437 0.0184 -7.8039 < 1e-04
  106. rocks5 -0.1933 0.0258 -7.5044 < 1e-04
  107. rocks6 -0.4962 0.0574 -8.6376 < 1e-04
  108. position-0.561514296868636 -0.2333 0.0180 -12.9644 < 1e-04
  109. position0.381120787744946 -0.4953 0.0193 -25.6413 < 1e-04
  110. position1.32375587235853 -0.8913 0.0234 -38.0653 < 1e-04
  111. position2.26639095697211 -1.0993 0.0276 -39.8970 < 1e-04
  112.  
  113. Zero-part coefficients:
  114. Estimate Std.Err z-value p-value
  115. (Intercept) -3.5587 0.1180 -30.1541 < 1e-04
  116. stock 0.1724 0.0255 6.7729 < 1e-04
  117. slope 0.2517 0.0272 9.2508 < 1e-04
  118. precipitation -0.1457 0.0296 -4.9197 < 1e-04
  119. rocks2 0.3587 0.0719 4.9900 < 1e-04
  120. rocks3 0.3497 0.0823 4.2506 < 1e-04
  121. rocks4 0.3951 0.0845 4.6742 < 1e-04
  122. rocks5 0.5387 0.1110 4.8507 < 1e-04
  123. rocks6 0.5434 0.2539 2.1404 0.032319
  124. position-0.561514296868636 0.3085 0.1215 2.5384 0.011136
  125. position0.381120787744946 0.8707 0.1219 7.1406 < 1e-04
  126. position1.32375587235853 1.5953 0.1251 12.7515 < 1e-04
  127. position2.26639095697211 2.0707 0.1270 16.3061 < 1e-04
  128.  
  129. log(residual std. dev.):
  130. Estimate Std.Err
  131. -0.2856 0.0052
  132.  
  133. Integration:
  134. method: adaptive Gauss-Hermite quadrature rule
  135. quadrature points: 11
  136.  
  137. Optimization:
  138. method: hybrid EM and quasi-Newton
  139. converged: TRUE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement