@param returnValue numeric value giving the value for which the risk ratio should be calculated, where the resulting period will be the average number of blocks until the value is exceeded and the probability the probability of exceeding the value in any single block.
@param y1 numpy array of observed maxima or minima values for the first dataset. See ‘Details’ for how the values of ‘y1’ should be ordered if there are multiple replicates and the values of ‘x1’ are identical for all replicates.
@param y2 numpy array of observed maxima or minima values for the second dataset. Analogous to ‘y1’.
@param x1 numpy array or pandas data frame with columns corresponding to covariate/predictor/feature variables and each row containing the values of the variable for the corresponding observed maximum/minimum. The number of rows should either equal the length of ‘y1’ or (if there is more than one replicate) it can optionally equal the number of observations in a single replicate, in which case the values will be assumed to be the same for all replicates. 
@param x2 analogous to ‘x1’ but for the second dataset
@param locationFun1 numpy array of either character strings or indices describing a linear model (i.e., regression function) for the location parameter using columns from ‘x1’ for the first dataset. ‘x1’ must be supplied if this is anything other than ‘None’.
@param locationFun2 numpy array of either character strings or indices describing a linear model (i.e., regression function) for the location parameter using columns from ‘x2’ for the second dataset. ‘x2’ must be supplied if this is anything other than ‘None’.
@param scaleFun1 numpy array of either character strings or indices describing a linear model (i.e., regression function) for the log of the scale parameter using columns from ‘x1’ for the first dataset.  ‘x1’ must be supplied if this is anything other than ‘None’.
@param scaleFun2 numpy array of either character strings or indices describing a linear model (i.e., regression function) for the log of the scale parameter using columns from ‘x2’ for the second dataset.  ‘x2’ must be supplied if this is anything other than ‘None’.
@param shapeFun1 numpy array of either character strings or indices describing a linear model (i.e., regression function) for the shape parameter using columns from ‘x1’ for the first dataset.  ‘x1’ must be supplied if this is anything other than ‘None’.
@param shapeFun2 numpy array of either character strings or indices describing a linear model (i.e., regression function) for the shape parameter using columns from ‘x2’ for the first dataset.  ‘x2’ must be supplied if this is anything other than ‘None’.
@param nReplicates1 numeric value indicating the number of replicates for the first dataset.
@param nReplicates2 numeric value indicating the number of replicates for the second dataset.
@param replicateIndex1 numpy array providing the index of the replicate corresponding to each element of ‘y1’. Used (and therefore required) only when using bootstrapping with the resampling by replicates based on the ‘by’ element of ‘bootControl’.
@param replicateIndex2 numpy array providing the index of the replicate corresponding to each element of ‘y2’. Analogous to ‘replicateIndex1’.
@param weights1 numpy array providing the weights for each observation in the first dataset. When there is only one replicate or the weights do not vary by replicate, an array of length equal to the number of observations. When weights vary by replicate, this should be of equal length to ‘y’. Likelihood contribution of each observation is multiplied by the corresponding weight. 
@param weights2 numpy array providing the weights for each observation in the second dataset. Analogous to ‘weights1’.
@param xNew1 object of the same form as ‘x1’, providing covariate/predictor/feature values for which one desires log risk ratios.
@param xNew2 object of the same form as ‘x2’, providing covariate/predictor/feature values for which log risk ratios are desired. Must provide the same number of covariate sets as ‘xNew1’ as the risk ratio is based on contrasting return probabilities under ‘xNew1’ and ‘xNew2’.
@param maxes boolean indicating whether analysis is for block maxima (‘True’) or block minima (‘False’); in the latter case, the function works with the negative of the values, changing the sign of the resulting location parameters
@param scaling1 positive-valued scalar used to scale the data values of the first dataset for more robust optimization performance. When multiplied by the values, it should produce values with magnitude around 1.
@param scaling2 positive-valued scalar used to scale the data values of the second dataset for more robust optimization performance. When multiplied by the values, it should produce values with magnitude around 1.
@param ciLevel statistical confidence level for confidence intervals; in repeated experimentation, this proportion of confidence intervals should contain the true risk ratio. Note that if only one endpoint of the resulting interval is used, for example the lower bound, then the effective confidence level increases by half of one minus ‘ciLevel’. For example, a two-sided 0.90 confidence interval corresponds to a one-sided 0.95 confidence interval.
@param ciType string or numpy array of strings indicating which type of confidence intervals to compute. See ‘Details’.
@param bootSE boolean indicating whether to use the bootstrap to estimate the standard error of the risk ratio.
@param bootControl dictionary of control parameters for the bootstrapping, used only when at least one bootstrap confidence interval is requested via ‘ciType’. See ‘Details’.
@param lrtControl dictionary containing a single component, a numpy array named ‘bounds’, which sets the range inside which the algorithm searches for the endpoints of the likelihood ratio-based confidence interval. This avoids numerical issues with endpoints converging to zero and infinity. If an endpoint is not found within the interval, it is set to ‘nan’. Used only when ‘'lrt'’ is one of the ‘ciType’ values.
@param optimArgs a dictionary with named components matching exactly any arguments that the user wishes to pass to R's ‘optim’ function. See ‘help(optim)’ in R for details. Of particular note, ‘'method'’ can be used to choose the optimization method used for maximizing the log-likelihood to fit the model (e.g., ‘'method'’ could be ‘'BFGS'’ instead of the default ‘'Nelder-Mead'’) and ‘control={'maxit': VALUE)’ for a user-specified VALUE can be used to increase the number of iterations if the optimization is converging slowly.
@param initial1 a dictionary with components named ‘'location'’, ‘'scale'’, and ‘'shape'’ providing initial parameter values, intended for use in speeding up or enabling optimization when the default initial values are resulting in failure of the optimization; note that use of ‘scaling’, ‘logScale’ and ‘.normalizeX = True’ cause numerical changes in some of the parameters.
@param initial2 a dictionary of initial parameter values for the second dataset, analogous to ‘initial1’.
@param logScale1 boolean indicating whether optimization for the scale parameter should be done on the log scale for the first dataset. By default this is ‘False’ when the scale is not a function of covariates and ‘True’ when the scale is a function of covariates (to ensure the scale is positive regardless of the regression coefficients). 
@param logScale2 boolean indicating whether optimization for the scale parameter should be done on the log scale for the second dataset. By default this is ‘False’ when the scale is not a function of covariates and ‘True’ when the scale is a function of covariates (to ensure the scale is positive regardless of the regression coefficients). 
@param getReturnCalcs boolean indicating whether to return the estimated return values/probabilities/periods from the fitted models. 
@param getParams boolean indicating whether to return the fitted parameter values and their standard errors for the fitted models; WARNING: parameter values for models with covariates for the scale parameter must interpreted based on the value of ‘logScale’.
@param getFit boolean indicating whether to return the full fitted models (potentially useful for model evaluation and for understanding optimization problems); note that estimated parameters in the fit object for nonstationary models will not generally match the MLE provided when ‘getParams’ is ‘True’ because covariates are normalized before fitting and the fit object is based on the normalized covariates. Similarly, parameters will not match if ‘scaling’ is not 1.
