The maximum number of independent features in principle from
haplotypes (i.e. interactions between SNPs) generated by Haplotype Trend Regression with eXtra flexibility (HTRX).
htrx_max returns a positive integer giving the maximum
number of independent features to be included in the analysis.
Arguments
nsnp
a positive integer giving the number of single nucleotide polymorphisms (SNPs) included in the haplotypes.
n_haps
a positive integer giving the number of haplotypes,
which is also the number of columns of the HTRX or HTR matrix.
cap
a positive integer which manually sets the maximum number of independent features.
By default, cap=40.
max_int
a positive integer which specifies the maximum number of SNPs that can interact.
If no value is given (by default), interactions between all the SNPs will be considered.
htr
logical. If htr=TRUE, the functions returns the maximum number of independent
features for HTR. By default, htr=FALSE.
Details
The maximum number of independent features in principle is 2nsnp-1
for haplotypes containing interactions between all different numbers of SNPs.
However, if max_int < nsnp, i.e. only the interactions between at most max_int SNPs are investigated,
there will be fewer maximum number of independent features.
You can also manually set the upper limit of independent features (by setting cap) that can be included in the final HTRX or HTR model.