Displaying 2 results from an estimated 2 matches for "delta_2".
Did you mean:
delta2
2011 Nov 12
1
State space model
...variables
n <- ncol(x) # is the length of the observed sample
d <- nrow(x) # is the number of observed variables.
h <- 1/52
## creating state space representation of 2-factor CIR model
CIR2ss <- function(K_1, K_2, sigma_1, sigma_2, lambda_1, lambda_2, theta_1,
theta_2, delta_0, delta_1, delta_2) {
## defining auxilary parameters,
phi_11 <- sqrt((K_1+lambda_1)^2+2*sigma_1^2*delta_1)
phi_21 <- sqrt((K_2+lambda_2)^2+2*sigma_2^2*delta_2)
phi_12 <- K_1+lambda_1+phi_11
phi_22 <- K_2+lambda_2+phi_21
phi_13 <- 2*K_1*theta_1/sigma_1^2
phi...
2011 Nov 22
1
Generate Simulation
...(i in 1:length(vec_IS)){
for (j in 1:length(vec_IT)){
Yr_m<-rnorm(54,m=0,sd=1)
mat_Yr_m[,j]<-Yr_m
delta_i<-lower_m%*%mat_Yr_m[,j]
mat_delta[,j]<-as.vector(delta_i)
}
DELTA_1<-mat_delta[,1]
DELTA_2<-mat_delta[,2]-a_1*mat_delta[,1]
for (t in 3:length(vec_IT)){
mat_DELTA[,t]<-mat_delta[,t] - a_1*mat_delta[,t-1]
- a_2*mat_delta[,t-2]
}
mat_DELTA[,1]<-DELTA_1
mat_DELTA[,2]<-DELTA_2...