numerically_evaluate_xt_ARMA_01 = function(theta10,a_t,w_t){ # # Given a time series of differences in w_t and the initial time # series of white noise in a_t and the initial MA(1) parameter theta1 # this routine numerically computes an estimate of the (negative) derivative of # a_t with resepect to theta1 # # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- source('uncond_sum_of_squares_ARMA_01.R') param_step = 0.02 if( theta10 != 0 ){ delta_theta1 = param_step * theta10 # take a step in theta1 ... call S() using arguments in lambda }else{ delta_theta1 = param_step } new_theta1 = theta10 + delta_theta1 res = uncond_sum_of_squares_ARMA_01(new_theta1,w_t) new_a_t = res[[3]] x_t = ( a_t - new_a_t )/delta_theta1 return( x_t ) }