Autocorrelation in a model

I am in the process of cleaning up the pymc2 code. I haven’t fully tested this version but this is what I have right now. I am generating auto-correlated values of LogRecruit. Thanks for taking a look at this.

def Recruitment(self):
    '''Log of Relative annual Recruitment'''

    #Will be subjected to antiLogit transformation
    self.T = Normal('T', 7.78, 0.667)
    #Coefficient for autocorrelation
    self.Ro = Lambda('Ro', lambda t=self.T: expit(t))
    self.Omega = Lambda('Omega', lambda t=self.Ro: np.sqrt(1 - t * t))

    #Standard deviation of recruitment rate
    self.lnSigmaRecruit = Normal('lnSigmaRecruit', 2.5, 1)
    self.tauRecruit = Lambda(
        'tauRecruit', lambda t=self.lnSigmaRecruit: np.exp(-2 * t))

    self.LogRecruit = numpy.empty(self.nyear, dtype=object)
    self.LogRecruit[0] = Normal('LogRecruit_' + str(self.MinYear), 0,
                                self.tauRecruit)
    for y in range(1, self.nyear):
        self.LogRecruit[y] = Normal('LogRecruit_' + str(self.MinYear + y),
                                    self.Ro * self.LogRecruit[y - 1],
                                    self.tauRecruit / self.Omega / self.Omega)