Calculate standard errors of clustering parameters.
calc_SE_bicluster.RdCalculate SE of parameters fitted using clustord.
Usage
calc_SE_rowcluster(long_df, clust_out, control_optim = default_control_optim())
calc_SE_bicluster(long_df, clust_out, control_optim = default_control_optim())Details
Use calc_SE_rowcluster to calculate SE for row clustering and column
clustering, or calc_SE_bicluster to calculate SE for biclustering.
Calculates SE by running optimHess (see optim) on
the incomplete-data log-likelihood to find the hessian at the fitted parameter
values from clustord.
Then the square roots of the diagonal elements of the negative inverse of the
hessian are the standard errors of the parameters
i.e. SE <- sqrt(diag(solve(-optim_hess)).
Note that SE values are only calculated for the independent parameters. For example, if the constraint on the row clustering parameters is set to constraint_sum_zero = TRUE, where the last row clustering parameter is the negative sum of the other parameters, SE values will only be calculated for the first RG-1 parameters, the independent ones. This applies similarly to individual column effect coefficients, etc.
The function requires an input which is the output of
clustord, which includes the component out_parvec, the
final vector of independent parameter values from the EM algorithm, which
will correspond to a subset of the parameter values in out_parlist.