code: def skipped(x, y, corr_type="spearman"):
      """Skipped correlation (Rousselet and Pernet 2012).
  
      Parameters
      ----------
      x, y : array_like
          First and second set of observations. x and y must be independent.
      corr_type : str
          Method used to compute the correlation after outlier removal. Can be
          either 'spearman' (default) or 'pearson'.
  
      Returns
      -------
      r : float
          Skipped correlation coefficient.
      pval : float
          Two-tailed p-value.
      outliers : array of bool
          Indicate if value is an outlier or not
  
      Notes
      -----
      The skipped correlation involves multivariate outlier detection using a
      projection technique (Wilcox, 2004, 2005). First, a robust estimator of
      multivariate location and scatter, for instance the minimum covariance
      determinant estimator (MCD; Rousseeuw, 1984; Rousseeuw and van Driessen,
      1999; Hubert et al., 2008) is computed. Second, data points are
      orthogonally projected on lines joining each of the data point to the
      location estimator. Third, outliers are detected using a robust technique.
      Finally, Spearman correlations are computed on the remaining data points
      and calculations are adjusted by taking into account the dependency among
      the remaining data points.
  
      Code inspired by Matlab code from Cyril Pernet and Guillaume
      Rousselet [1]_.
  
      Requires scikit-learn.
  
      References
      ----------
      .. [1] Pernet CR, Wilcox R, Rousselet GA. Robust Correlation Analyses:
         False Positive and Power Validation Using a New Open Source Matlab
         Toolbox. Frontiers in Psychology. 2012;3:606.
         doi:10.3389/fpsyg.2012.00606.
      """
      # Check that sklearn is installed
      from pingouin.utils import _is_sklearn_installed
  
      _is_sklearn_installed(raise_error=True)
      from scipy.stats import chi2
      from sklearn.covariance import MinCovDet
  
      X = np.column_stack((x, y))
      nrows, ncols = X.shape
      gval = np.sqrt(chi2.ppf(0.975, 2))
      # Compute center and distance to center
      center = MinCovDet(random_state=42).fit(X).location_
  
      # https://github.com/raphaelvallat/pingouin/issues/164
      warnings.warn(
          "The skipped correlation relies on the Minimum Covariance Determinant "
          "algorithm, which gives slightly different results in Python "
          "(scikit-learn) than in the original Matlab library (LIBRA). As such, "
          "the skipped correlation may be different from the Matlab robust "
          "correlation toolbox (see issue 164 on Pingouin's GitHub). "
          "Make sure to double check your results or use another robust "
          "correlation method."
      )
  
      B = X - center
      bot = (B**2).sum(axis=1)
      # Loop over rows
      dis = np.zeros(shape=(nrows, nrows))
      for i in np.arange(nrows):
          if bot[i] != 0:  # Avoid division by zero error
              dis[i, :] = np.linalg.norm(
                  B.dot(B[i, :, None]) * B[i, :] / bot[i], axis=1
              )
  
      # Detect outliers
      def idealf(x):
          """Compute the ideal fourths IQR (Wilcox 2012)."""
          n = len(x)
          j = int(np.floor(n / 4 + 5 / 12))
          y = np.sort(x)
          g = (n / 4) - j + (5 / 12)
          low = (1 - g) * y[j - 1] + g * y[j]
          k = n - j + 1
          up = (1 - g) * y[k - 1] + g * y[k - 2]
          return up - low
  
      # One can either use the MAD or the IQR (see Wilcox 2012)
      # MAD = mad(dis, axis=1)
      iqr = np.apply_along_axis(idealf, 1, dis)
      thresh = np.median(dis, axis=1) + gval * iqr
      outliers = np.apply_along_axis(np.greater, 0, dis, thresh).any(
          axis=0
      )
      # Compute correlation on remaining data
      if corr_type == "spearman":
          r, pval = spearmanr(X[~outliers, 0], X[~outliers, 1])
      else:
          r, pval = pearsonr(X[~outliers, 0], X[~outliers, 1])
      return r, pval, outliers
  
imports: import warnings
  import numpy
  import pandas
  import pandas_flavor
  from scipy.spatial.distance import pdist, squareform
  from scipy.stats import pearsonr, spearmanr, kendalltau
  from pingouin.config import options
  from pingouin.power import power_corr
  from pingouin.multicomp import multicomp
  from pingouin.effsize import compute_esci
  from pingouin.utils import remove_na, _perm_pval, _postprocess_dataframe
  from pingouin.bayesian import bayesfactor_pearson
label_desc: Use image node_id 2 for calling a global function with example usage: skipped(x, y, corr_type) and returns: r,  pval,  outliers, unknown