#NEWLINE# def score_sqrt( self , params , calc_fe = True ) : #NEWLINE# #INDENT# '\n        Returns the score with respect to transformed parameters.\n\n        Calculates the score vector with respect to the\n        parameterization in which the random effects covariance matrix\n        is represented through its Cholesky square root.\n\n        Parameters\n        ----------\n        params : MixedLMParams or array-like\n            The model parameters.  If array-like must contain packed\n            parameters that are compatible with this model instance.\n        calc_fe : boolean\n            If True, calculate the score vector for the fixed effects\n            parameters.  If False, this vector is not calculated, and\n            a vector of zeros is returned in its place.\n\n        Returns\n        -------\n        score_fe : array-like\n            The score vector with respect to the fixed effects\n            parameters.\n        score_re : array-like\n            The score vector with respect to the random effects\n            parameters (excluding variance components parameters).\n        score_vc : array-like\n            The score vector with respect to variance components\n            parameters.\n        ' #NEWLINE# ( score_fe , score_re , score_vc ) = self . score_full ( params , calc_fe = score_re ) #NEWLINE# params_vec = params . get_packed ( use_sqrt = True , has_fe = True ) #NEWLINE# score_full = np . concatenate ( ( score_fe , score_re , score_vc ) ) #NEWLINE# scr = 0.0 #NEWLINE# for i in range ( len ( params_vec ) ) : #NEWLINE# #INDENT# v = ( self . _lin [ i ] + ( 2 * np . dot ( self . _quad [ i ] , params_vec ) ) ) #NEWLINE# scr += ( score_full [ i ] * v ) #NEWLINE# #UNINDENT# score_fe = scr [ 0 : self . k_fe ] #NEWLINE# score_re = scr [ self . k_fe : ( self . k_fe + self . k_re2 ) ] #NEWLINE# score_vc = scr [ ( self . k_fe + self . k_re2 ) : ] #NEWLINE# return ( score_fe , score_re , score_vc )