Commit 4383a56 1 parent baed7c1 commit 4383a56 Copy full SHA for 4383a56
File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -945,6 +945,7 @@ def __init__(
945
945
ref_cov = None ,
946
946
ref_cat = None ,
947
947
use_re = False ,
948
+ use_re_intercept = False ,
948
949
prior_beta_gaussian = None ,
949
950
prior_beta_uniform = None ,
950
951
prior_beta_laplace = None ,
@@ -965,6 +966,7 @@ def __init__(
965
966
prior_gamma_laplace = prior_gamma_laplace ,
966
967
)
967
968
self .ref_cat = ref_cat
969
+ self .use_re_intercept = use_re_intercept
968
970
if len (self .alt_cov ) != 1 :
969
971
raise ValueError ("alt_cov should be a single column." )
970
972
if len (self .ref_cov ) > 1 :
@@ -1026,11 +1028,13 @@ def num_x_vars(self) -> int:
1026
1028
1027
1029
@property
1028
1030
def num_z_vars (self ) -> int :
1029
- """Number of the random effects. Currently it is the same with the
1030
- number of the fixed effects, but this is to be discussed.
1031
- TODO: Overwrite the number of random effects .
1031
+ """Number of the random effects. When use_re_intercept is set to True,
1032
+ it will use a single intercept random effect. Otherwise, it will use
1033
+ each category will have its own random effect .
1032
1034
1033
1035
"""
1036
+ if self .use_re_intercept :
1037
+ return 1
1034
1038
return self .num_x_vars
1035
1039
1036
1040
@property
You can’t perform that action at this time.
0 commit comments