'Create a MixedLMParams object from each parameter component.
Parameters
fe_params : array-like
The fixed effects parameter (a 1-dimensional array).  If
None, there are no fixed effects.
cov_re : array-like
The random effects covariance matrix (a square, symmetric
2-dimensional array).
cov_re_sqrt : array-like
The Cholesky (lower triangular) square root of the random
effects covariance matrix.
vcomp : array-like
The variance component parameters.  If None, there are no
variance components.
Returns
A MixedLMParams object.'

def from_components(fe_params=None, cov_re=None, cov_re_sqrt=None, vcomp=None):

    if (vcomp is None):
        vcomp = np.empty(0)
    if (fe_params is None):
        fe_params = np.empty(0)
    if ((cov_re is None) and (cov_re_sqrt is None)):
        cov_re = np.empty((0, 0))
    k_fe = len(fe_params)
    k_vc = len(vcomp)
    k_re = (cov_re.shape[0] if (cov_re is not None) else cov_re_sqrt.shape[0])
    pa = MixedLMParams(k_fe, k_re, k_vc)
    pa.fe_params = fe_params
    if (cov_re_sqrt is not None):
        pa.cov_re = np.dot(cov_re_sqrt, cov_re_sqrt.T)
    elif (cov_re is not None):
        pa.cov_re = cov_re
    pa.vcomp = vcomp
    return pa
