#
# DEL19 Malthus Model
#
# Measurement Matrix
# QA N
#[1,] 0.7071 0.7071
#[2,] 0.7071 -0.7071
#
# Fraction of Variance
#[1] 0.8734 1.0000
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
f <- matrix( c( 0.93889698, 0.2645764, 0.13350516,
0.05036955, 0.7438976, -0.03295577,
0.000000000, 0.0000000 ,1.0000000
),nrow=3,ncol=3, byrow=TRUE)
h <- eye(2,3)
k <- (f[,1:2,drop=FALSE])
DEL19_Malthus <- SS(F=f,H=h,K=k,z0=c( 0.13350516, -0.03295577, 1.0000000),
output.names=c("Growth","QA_N"))
print(DEL19_Malthus)
is.SS(DEL19_Malthus)
stability(DEL19_Malthus)
# help(simulate)
DEL19_Malthus.data <- simulate(DEL19_Malthus,sampleT=50,noise=matrix(0,50,2),start=1872)
seriesNames(outputData(DEL19_Malthus.data)) <- c("Growth","QA-N")
#tfplot(DEL19_Malthus.data)
DEL19_Malthus.datax <- simulate(DEL19_Malthus,sampleT=50,start=1872)
seriesNames(outputData(DEL19_Malthus.datax)) <- c("Growth","QA-N")
m<- l(DEL19_Malthus,TSdata(output=outputData(DEL19_Malthus.datax)))
#tfplot(m)
shockDecomposition(toSSChol(m))
tfplot(forecast(m,horizon=50))