1
- function Base. show (io:: IO , est:: EstimationStatsSDM )
1
+ function Base. show (io:: IO , est:: EstimationStatsSDM{D, T} ) where {D, T}
2
2
println (" --------------------------------------------------------" )
3
- println (" log-likelihood: " , @sprintf (" %.4f" , est. loglikelihood))
4
- println (" np: " , Int (est. np))
5
- println (" AIC: " , @sprintf (" %.4f" , est. aic))
6
- println (" BIC: " , @sprintf (" %.4f" , est. bic))
3
+ println (" Distribution: " , D)
4
+ println (" Number of observations: " , Int (est. num_obs))
5
+ println (" Number of unknown parameters: " , Int (est. np))
6
+ println (" Log-likelihood: " , @sprintf (" %.4f" , est. loglikelihood))
7
+ println (" AIC: " , @sprintf (" %.4f" , est. aic))
8
+ println (" BIC: " , @sprintf (" %.4f" , est. bic))
7
9
print_coefs_stats (est. coefs_stats)
8
10
return nothing
9
11
end
10
12
11
- function print_coefs_stats (coefs_stats)
13
+ function print_coefs_stats (coefs_stats:: CoefsStatsSDM{T} ) where T
12
14
println (" --------------------------------------------------------" )
13
15
println (" Parameter Estimate Std.Error t stat p-value" )
14
16
offset = 1
@@ -18,7 +20,8 @@ function print_coefs_stats(coefs_stats)
18
20
println (p)
19
21
offset += 1
20
22
end
21
- for k in sort (collect (keys (coefs_stats. unknowns. A)))
23
+ sorted_keys_A = sort (collect (keys (coefs_stats. unknowns. A)))
24
+ for k in sorted_keys_A
22
25
for i in coefs_stats. unknowns. A[k]
23
26
p_c, p_std, p_t_stat, p_p_val = print_coefs_sta (coefs_stats, offset)
24
27
ind = round (Int, sqrt (i))
@@ -27,7 +30,8 @@ function print_coefs_stats(coefs_stats)
27
30
offset += 1
28
31
end
29
32
end
30
- for k in sort (collect (keys (coefs_stats. unknowns. B)))
33
+ sorted_keys_B = sort (collect (keys (coefs_stats. unknowns. B)))
34
+ for k in sorted_keys_B
31
35
for i in coefs_stats. unknowns. B[k]
32
36
p_c, p_std, p_t_stat, p_p_val = print_coefs_sta (coefs_stats, offset)
33
37
ind = round (Int, sqrt (i))
0 commit comments