You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello , i need urgent solution on the following. Having read the midas JSS article, i improve my question . I realise if i add
for(i in ((length(FinQ)+1):length(Mvs)))+ { FinQ = c(FinQ, 0)} before
Simulated low-frequency series (e.g. yearly)
the code runs and produce a graph of weights against high frequency lags which could not be produced before hoping i have done the right thing.
library(midasr)
set.seed(4)
Number of low-frequency observations
n<-146
Linear trend and higher-frequency explanatory variables (e.g. quarterly and monthly)
trend<-c(1:n)
Gdp <-ts(Gdp, start = c(1997, 1), frequency = 4)
Mvs <- ts(Ftwn, start = c(1997, 1), frequency = 12)
FinQ <- ts(FQrt[,-10], start = c(1997, 1), frequency = 4)
When i then try to run the below code, i am getting error which is below, anyone who can help here. I have tried all sorts of lag structure for mls(Gdp,..,2 nealmon) but can't manage to get it right to escape the error, what m i am doing wrong or how can i correct the issue here , thanks .
Hello , i need urgent solution on the following. Having read the midas JSS article, i improve my question . I realise if i add
for(i in ((length(FinQ)+1):length(Mvs)))+ { FinQ = c(FinQ, 0)} before
Simulated low-frequency series (e.g. yearly)
the code runs and produce a graph of weights against high frequency lags which could not be produced before hoping i have done the right thing.
library(midasr)
set.seed(4)
Number of low-frequency observations
n<-146
Linear trend and higher-frequency explanatory variables (e.g. quarterly and monthly)
trend<-c(1:n)
Gdp <-ts(Gdp, start = c(1997, 1), frequency = 4)
Mvs <- ts(Ftwn, start = c(1997, 1), frequency = 12)
FinQ <- ts(FQrt[,-10], start = c(1997, 1), frequency = 4)
Exponential Almon polynomial constraint-consistent coefficients
fn.FinQ<- nealmon(p=c(1,-0.5),d=9)
fn.Mvs <- nealmon(p=c(2,0.5,-1),d=9)
for(i in ((length(FinQ)+1):length(Mvs)))+ { FinQ = c(FinQ, 0)}
Simulated low-frequency series (e.g. yearly)
Gdp<-2+0.1trend + mls(FinQ,2,3)%%fn.FinQ + mls(Mvs,2,3)%*%fn.Mvs + rnorm(n)
When i then try to run the below code, i am getting error which is below, anyone who can help here. I have tried all sorts of lag structure for mls(Gdp,..,2 nealmon) but can't manage to get it right to escape the error, what m i am doing wrong or how can i correct the issue here , thanks .
Gdp<- na.omit(Gdp)
EQ <- midas_r(Gdp ~ trend + mls(FinQ,3,2, nealmon) + mls(Mvs,7:12,8, nealmon), start=list(Gdp=c(10,1,-0.1),Mvs=c(2,-0.1)))
Error in model.frame.default(formula = Gdp ~ trend + mls(FinQ, 3, 2, nealmon) + : variable lengths differ (found for 'trend')
The text was updated successfully, but these errors were encountered: