RATS 매뉴얼
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
해당 자료는 10페이지 까지만 미리보기를 제공합니다.
10페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

RATS 매뉴얼에 대한 보고서 자료입니다.

목차

RATS 메뉴얼

본문내용

illustrate matrix manipulations. Consider the first five lines of Program 5.3 on the file
CHAPTER5.PRG:
compute number = 24
all number
com alpha = ||1.1, -.4, .2 ||
com beta = ||-.7, .3||
The first two lines set the default length of any series to 24. You can change the value of
“number” to obtain a smaller or larger number of impulse responses.
The third and fourth lines create the vectors alpha and beta. The two vectors hold the
coefficients of the ARMA model. Here you can enter as many or as few values for αi and βi as
desired. In the example, α1 = 1.1, α2 = -0.4, α3 = 0.2, β1 = -.7 and β2 = 0.3. Hence, these first
four lines have accomplished task 1. However, we did not DECLARE either alpha or beta to be
vectors—refer to the individual elements of each as alpha(1,1), alpha(1,2), alpha(1,3), beta(1,1)
and beta(1,2).
Now we need to do some bookkeeping. Our first bookkeeping task is to compute values of p and
q, i.e., the dimensions of the alpha and beta vectors. The function %cols(A) returns the number
of columns in matrix A. Hence, we can obtain p and q using:
compute p = %cols(alpha)
compute q = %cols(beta)
Unless otherwise specified, creation of a literal vector using COMPUTE causes RATS to create
a row vector. Hence, alpha has 1 row and 3 columns while beta has 1 row and 2 columns.
Next, we need to set up a vector—that we call phi—to hold the twenty-four values of the {φi}.
However, there is a small problem in that a vector cannot have an element zero. Thus, we cannot
use the notation φ0, φ1 … because we cannot have an element of a vector designated as phi(0).
Instead, we need to store the first value of φ in phi(1), the second value in phi(2), … . Thus,
phi(1) will equal 1, phi(2) will equal β1 + α1phi(1), … . In essence, we need to create the phi
vector such that phi(1) = φ0, phi(2) = φ1, … Hence, we will replace the usual formula for
calculating impulse responses with:
φ1 = 1
Σ=
+ + − = +
j
k
j j k j k
1
1 1 φ β α φ for j = 1, 2, 3, … , 23
We can DECLARE the phi vector to contain 24 elements and initialize the first value phi(1) = 1
com phi(1) = 1.
We cannot directly use the formula above since αk is undefined for k > p and βj is undefined for j
> q. The final bookkeeping task concerns treatment of these values. One straightforward method
is to define two new vectors of dimension 24. We can let the first p elements of vector A hold the
elements of alpha and set the remaining values to zero. Similarly, we can let the first q elements
of vector B hold the elements of beta and set the remaining values to zero.
dec vect a(number) b(number)
com a = %const(0.) , b = %const(0.)
ewise a(i) = %if(i<=p, alpha(1,i), 0.0)
ewise b(i) = %if(i<=q ,beta(1,i), 0.0)
Hence, the DECLARE instruction in the program segment above creates the vectors A and B and
sets the dimension of each to 24. COMPUTE uses the %CONST(x) instruction to set all values
of A and B to equal the constant zero.36 Next, looping over p, equates the first p values of A with
the corresponding elements of alpha. Similarly, looping over q sets the first q elements of B
equal to the corresponding elements of beta. Finally, we can write a routine that calculates the
remaining values of phi.
do j = 1,number-1
com phi(j+1) = b(j)
do k = 1,j ; com phi(j+1) = phi(j+1) + phi(j+1-k)*a(k) ; end do k
end do j
The first loop initializes phi(j+1) equal to βj. Each time through the inner loop (i.e., for each
value of k), αkφj+1-k is added to phi(j+1). Exiting this inner loop yields the desired sum:
Σ=
+ + − = +
j
k
j j k j k
1
1 1 φ β α φ
This process is repeated for each value of j up to and including j = 23.
The last task is to create a bar graph of the phi sequence. Since phi is a vector, it cannot be
graphed directly. However, we can convert phi into a series called response and graph response
using:
set response = phi(t)
gra(style=bar,heade

키워드

  • 가격3,000
  • 페이지수256페이지
  • 등록일2014.03.12
  • 저작시기2014.3
  • 파일형식아크로뱃 뷰어(pdf)
  • 자료번호#907822
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니