#NEWLINE# @ np . deprecate ( message = 'mstats.f_value_wilks_lambda deprecated in scipy 0.17.0' ) #NEWLINE# def f_value_wilks_lambda( ER , EF , dfnum , dfden , a , b ) : #NEWLINE# #INDENT# 'Calculation of Wilks lambda F-statistic for multivariate data, per\n    Maxwell & Delaney p.657.\n    ' #NEWLINE# ER = ma . array ( ER , copy = False , ndmin = 2 ) #NEWLINE# EF = ma . array ( EF , copy = False , ndmin = 2 ) #NEWLINE# if ( ma . getmask ( ER ) . any ( ) or ma . getmask ( EF ) . any ( ) ) : #NEWLINE# #INDENT# raise NotImplementedError ( 'Not implemented when the inputs have missing data' ) #NEWLINE# #UNINDENT# lmbda = ( np . linalg . det ( EF ) / np . linalg . det ( ER ) ) #NEWLINE# q = ma . sqrt ( ( ( ( ( ( a - 1 ) ** 2 ) * ( ( b - 1 ) ** 2 ) ) - 2 ) / ( ( ( ( a - 1 ) ** 2 ) + ( ( b - 1 ) ** 2 ) ) - 5 ) ) ) #NEWLINE# q = ma . filled ( q , 1 ) #NEWLINE# n_um = ( ( ( 1 - ( lmbda ** ( 1.0 / q ) ) ) * ( a - 1 ) ) * ( b - 1 ) ) #NEWLINE# d_en = ( ( lmbda ** ( 1.0 / q ) ) / ( ( ( n_um * q ) - ( ( 0.5 * ( a - 1 ) ) * ( b - 1 ) ) ) + 1 ) ) #NEWLINE# return ( n_um / d_en )