code: def test_from_formula_vs_no_formula(model):
      mod = model.from_formula(
          "Histamine0 + Histamine1 + Histamine3 + Histamine5 ~ Drug * Depleted",
          data,
      )
      r = mod.fit(method="svd")
      r0 = r.mv_test()
      endog, exog = patsy.dmatrices(
          "Histamine0 + Histamine1 + Histamine3 + Histamine5 ~ Drug * Depleted",
          data,
          return_type="dataframe",
      )
      L = np.array([[1, 0, 0, 0, 0, 0]])
      # DataFrame input
      r = model(endog, exog).fit(method="svd")
      r1 = r.mv_test(hypotheses=[["Intercept", L, None]])
      assert_array_almost_equal(
          r1["Intercept"]["stat"].values,
          r0["Intercept"]["stat"].values,
          decimal=6,
      )
      # Numpy array input
      r = model(endog.values, exog.values).fit(method="svd")
      r1 = r.mv_test(hypotheses=[["Intercept", L, None]])
      assert_array_almost_equal(
          r1["Intercept"]["stat"].values,
          r0["Intercept"]["stat"].values,
          decimal=6,
      )
      L = np.array(
          [
              [0, 1, 0, 0, 0, 0],
              [0, 0, 1, 0, 0, 0],
          ]
      )
      r1 = r.mv_test(hypotheses=[["Drug", L, None]])
      # DataFrame input
      r = model(endog, exog).fit(method="svd")
      r1 = r.mv_test(hypotheses=[["Drug", L, None]])
      assert_array_almost_equal(
          r1["Drug"]["stat"].values,
          r0["Drug"]["stat"].values,
          decimal=6,
      )
      # Numpy array input
      r = model(endog.values, exog.values).fit(method="svd")
      r1 = r.mv_test(hypotheses=[["Drug", L, None]])
      assert_array_almost_equal(
          r1["Drug"]["stat"].values,
          r0["Drug"]["stat"].values,
          decimal=6,
      )
  
imports: import os.path
  import numpy
  import pandas
  import pytest
  from statsmodels.regression.linear_model import OLS
  from statsmodels.multivariate.multivariate_ols import _MultivariateOLS, MultivariateLS
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_raises
  import patsy
label_desc: Use image node_id 5 for calling a global function with example usage: test_from_formula_vs_no_formula(model) without return types