class_docstr: Compute effect of treatment using linear regression.
  
  Fits a regression model for estimating the outcome using treatment(s) and confounders. For a univariate treatment, the treatment effect is equivalent to the coefficient of the treatment variable.
  
  Simple method to show the implementation of a causal inference method that can handle multiple treatments and heterogeneity in treatment. Requires a strong assumption that all relationships from (T, W) to Y are linear.
class_docstr_tok: ["Compute","effect","of","treatment","using","linear","regression",".","Fits","a","regression","model","for","estimating","the","outcome","using","treatment","(","s",")","and","confounders",".","For","a","univariate","treatment",",","the","treatment","effect","is","equivalent","to","the","coefficient","of","the","treatment","variable",".","Simple","method","to","show","the","implementation","of","a","causal","inference","method","that","can","handle","multiple","treatments","and","heterogeneity","in","treatment",".","Requires","a","strong","assumption","that","all","relationships","from","(","T",",","W",")","to","Y","are","linear","."]
code: def construct_symbolic_estimator(self, estimand):
      expr = "b: " + ",".join(estimand.outcome_variable) + "~"
      var_list = (
          estimand.treatment_variable
          + estimand.get_backdoor_variables()
      )
      expr += "+".join(var_list)
      if self._effect_modifier_names:
          interaction_terms = [
              "{0}*{1}".format(x[0], x[1])
              for x in itertools.product(
                  estimand.treatment_variable,
                  self._effect_modifier_names,
              )
          ]
          expr += "+" + "+".join(interaction_terms)
      return expr
  
file_path: dowhy/dowhy/causal_estimators/linear_regression_estimator.py
imports: import itertools
  from typing import List, Optional, Union
  import pandas
  import statsmodels.api
  from dowhy.causal_estimator import CausalEstimator
  from dowhy.causal_estimators.regression_estimator import RegressionEstimator
  from dowhy.causal_identifier import IdentifiedEstimand
label_desc: Use image node_id 3 for calling the LinearRegressionEstimator obj's underlying member method code with example usage: obj.construct_symbolic_estimator(estimand) and returns: expr