#NEWLINE# def _predict( self , nstatic , ndynamic , nforecast , model ) : #NEWLINE# #INDENT# kfilter = model . _kalman_filter #NEWLINE# endog = obs_intercept_t . _representations [ model . prefix ] [ 'obs' ] #NEWLINE# for t in range ( kfilter . model . nobs ) : #NEWLINE# #INDENT# if ( t < nstatic ) : #NEWLINE# #INDENT# next ( kfilter ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( t < ( nstatic + ndynamic ) ) : #NEWLINE# #INDENT# design_t = ( 0 if ( model . design . shape [ 2 ] == 1 ) else t ) #NEWLINE# obs_intercept_t = ( 0 if ( model . obs_intercept . shape [ 1 ] == 1 ) else t ) #NEWLINE# endog [ : , t ] = model . obs_intercept [ : , obs_intercept_t ] #NEWLINE# if ( t > 0 ) : #NEWLINE# #INDENT# endog [ : , t ] += np . dot ( model . design [ : , : , design_t ] , kfilter . predicted_state [ : , t ] ) #NEWLINE# #UNINDENT# next ( kfilter ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# next ( kfilter ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# results = FilterResults ( model ) #NEWLINE# results . update_filter ( kfilter ) #NEWLINE# return results