class_docstr: Inherits time series methods from TSM parent class.
  
  **** NEURAL NETWORK AUTOREGRESSIVE (NNAR) MODELS ****
  
  Parameters
  ----------
  data : pd.DataFrame or np.ndarray
      Field to specify the univariate time series data that will be used.
  
  ar : int
      Field to specify how many AR lags the model will have.
  
  units : int
      How many units for the neural network
  
  layers : int
      How many layers for the neural networ
  
  activation : function
      E.g. np.tanh, np.array (linear)
  
  family: family object
      E.g. pf.Normal()
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","parent","class",".","*","*","*","*","NEURAL","NETWORK","AUTOREGRESSIVE","(","NNAR",")","MODELS","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","or","np.ndarray","Field","to","specify","the","univariate","time","series","data","that","will","be","used",".","ar",":","int","Field","to","specify","how","many","AR","lags","the","model","will","have",".","units",":","int","How","many","units","for","the","neural","network","layers",":","int","How","many","layers","for","the","neural","networ","activation",":","function","E.g",".","np.tanh",",","np.array","(","linear",")","family",":","family","object","E.g",".","pf.Normal","(",")"]
docstr: Creates the model's latent variables
  
  Returns
  ----------
  None (changes model attributes)
docstr_tok: ["Creates","the","model","'s","latent","variables","Returns","--","--","--","--","--","None","(","changes","model","attributes",")"]
code: def _create_latent_variables(self):
      """Creates the model's latent variables
  
      Returns
      ----------
      None (changes model attributes)
      """
  
      # Input layer
      for unit in range(self.units):
          self.latent_variables.add_z(
              "Constant | Layer " + str(1) + " | Unit " + str(unit + 1),
              fam.Cauchy(0, 1, transform=None),
              fam.Normal(0, 3),
          )
  
          for ar_term in range(self.ar):
              self.latent_variables.add_z(
                  "AR"
                  + str(ar_term + 1)
                  + " | Layer "
                  + str(1)
                  + " | Unit "
                  + str(unit + 1),
                  fam.Cauchy(0, 1, transform=None),
                  fam.Normal(0, 3),
              )
  
          for z in range(len(self.X_names)):
              self.latent_variables.add_z(
                  "Weight " + self.X_names[z],
                  fam.Cauchy(0, 1, transform=None),
                  fam.Normal(0, 3),
              )
  
      # Hidden layers
      for layer in range(1, self.layers):
          for unit in range(self.units):
              for weight in range(self.units):
                  self.latent_variables.add_z(
                      "Weight "
                      + str(weight + 1)
                      + " | Layer "
                      + str(layer + 1)
                      + " | Unit "
                      + str(unit + 1),
                      fam.Cauchy(0, 1, transform=None),
                      fam.Normal(0, 3),
                  )
  
      # Output layer
      for weight in range(self.units):
          self.latent_variables.add_z(
              "Output Weight " + str(weight + 1),
              fam.Cauchy(0, 1, transform=None),
              fam.Normal(0, 3),
          )
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  from patsy import dmatrices, dmatrix, demo_data
  from ..None import families
  from ..None import output
  from ..None import tests
  from ..None import tsm
  from ..None import data_check
  from .nn_architecture import neural_network_tanh, neural_network_tanh_mb
label_desc: Use image node_id 3 for calling the NNARX obj's underlying member method code with example usage: obj._create_latent_variables() without return types