similar to: Question about VAR (Vector Autoregression) in differences.

Displaying 20 results from an estimated 500 matches similar to: "Question about VAR (Vector Autoregression) in differences."

2007 Aug 30
2
possible bug in vars package (predict.varest) ???
hello, I have been trying to use the predict function in the vars package to forecast from a seasonal VAR model. The following code sample illustrates what I am trying to do and the error that I get when trying to do it. I run the following code, that results in the following error: data(Canada) endoC <- Canada[1:72,1:3] exoC <- Canada[1:72,4] var.2c <- VAR(endoC, p = 2,
2002 Dec 12
0
if problem in function
Dear all, I have written a function for calculating the volume of a tree (=trad) or snag (=h?gst). The included volume regreesion model includes ten parameter values, which are tree species specific. bj?rk.formh?jd.pars is an object which includes the parameter values (parameter set) for birch (=bj?rk). There is one row per tree in the data object. > relev.kols[1:5,
2004 Jul 23
0
problem lme using corSymm()
Hi, I got a computational problem with lme (nlme library R 1.9.1) using corSymm(). Here is the data: [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.19639793 0.09127954 0.11733288 0.07598273 0.06545106 0.06211532 [2,] 0.22773467 0.10981912 0.16052847 0.38101187 0.18353474 0.24072918 [3,] 0.46743388 0.45733836 0.32191178 0.43356107 0.39159746 0.53984221 [4,]
2010 Feb 07
1
Out-of-sample prediction with VAR
Good day, I'm using a VAR model to forecast sales with some extra variables (google trends data). I have divided my dataset into a trainingset (weekly sales + vars in 2006 and 2007) and a holdout set (2008). It is unclear to me how I should predict the out-of-sample data, because using the predict() function in the vars package seems to estimate my google trends vars as well. However, I want
2011 Oct 25
1
regression using GMM for mulltiple groups
Inthe code below I was trying to to obtain the GMM estimates for CAPM (REGRESSION) for 36 stocks each have 180 observations,however it only gives me one output rather than 36. In SAS i would just put in a *By statement*. I have a variable TICKER that categorize them into 36 groups. *How can I obtain all 36 output instead of just one.* **
2010 Feb 16
1
Math.factor error message
Dear R-helpers, I am using a vrtest on time series data. My commands are as follows; read.table("B.txt",sep="\t",fill=TRUE, na.strings = "NA") require(vrtest) rm(list=ls(all=TRUE)) datamat <- read.table("B.txt",sep="\t",fill=TRUE, na.strings = "NA") column <- 1 nob <- nrow(datamat) y <-
2011 Jun 27
1
Hardy Weinberg Simulation
Hello, I am trying to simulate 10 relicates of 100-tables. Each table is a 2 x 3 and 80% pf the tables are true nulls and 20% are non-nulls. The nulls follow the Hardy Weinberg distribution (ratio) 1:2:1. I have the code below but the p-values are not what I am expecting. I want to use the Cochran Armitage trend test to get the p-values. num.reps=10 num.vars=1000 pi0 = 80 num.subjects = 100
2013 Mar 14
1
Error message in vars package
Hi I'm getting an error message with the roots() function in the vars package. Even the example in the help file comes up with an error: > data(Canada) > var.2c <- VAR(Canada, p = 2, type = "const") > roots(var.2c) Error in UseMethod("roots") : no applicable method for 'roots' applied to an object of class "varest" The error is odd, for
2011 Oct 18
1
Repeat a loop until...
Dear all, I know there have been various questions posted over the years about loops but I'm afraid that I'm still stuck. I am using Windows XP and R 2.9.2. I am generating some data using the multivariate normal distribution (within the 'mnormt' package). [The numerical values of sanad and covmat are not important.] > datamat <-
2007 Oct 02
1
How to view the code of a method?
Dear All I am a biginner of R. I have difficulty with reading the code of a method. I am using the vars package to estimate a VAR model and I want to view the code of "predict" method for objects with class attribute "varest". I thougt I could just type the name "predict" without anything to display the code of the method as I often do with generic function.
2003 Jan 29
3
multinomial conditional logit models
A multinomial logit model can be specified as a conditional logit model after restructuring the data. Doing so gives flexibility in imposing restrictions on the dependent variable. One application is to specify a loglinear model for square tables, e.g. quasi-symmetry or quasi-independence, as a multinomial logit model with covariates. Further details on this technique and examples with several
2010 May 10
2
Warning message
Hello, I want to draw a histogram of the mean of sample observations drawn from multivariate t distribution. I am getting the following error corresponding to the code I used. Though I am getting the graph, but I am curious to know the warning message. Warning messages: 1: In if (freq) x$counts else { : the condition has length > 1 and only the first element will be used 2: In if (!freq)
2002 Jun 21
1
naming things in functions
Hello, I'm working with R version 1.5.0 in Windows. I've written a function (SummaryMat, segment below) which uses a loop to repeatedly call another function (PercentsMat, segment below). PercentsMat creates a matrix and adds rows to it each time it is called. I use deparse(substitute(...)) to get the names of the lists sent to PercentsMat to use them as row names in the generated
2012 Apr 02
2
Default parameter values in R functions?
Hi all, I have a newbie question: If I have a function with the following documentation: ca.jo(x, type = c("eigen", "trace"), ecdet = c("none", "const", "trend"), K = 2, spec=c("longrun", "transitory"), season = NULL, dumvar = NULL) Let's take "type" as an example... if I omit this parameter when calling the
2008 Mar 20
1
Cointegration no constant
Hi, I am trying to estimate a VECM without constant using the following code: data(finland) sjf <- finland sjf.reg<-ca.jo(sjf, type = c("eigen"), ecdet = c("none"), K = 2,spec=c("transitory"), season = NULL, dumvar = NULL) cajools(sjf.reg) While the cointegration test does not use a constant, it is used in the cajools which I do not want. I am sure I am
2006 Oct 10
1
.arch.uni in function call in arch test of vars package
I have been reviewing the arch test of vars package that is based on Engle's paper. R-metrics has this as a wants/todo item. I need an arch test and thought I might accomplish two things at once or at least try. The arch test requires a varest object and I am trying to write one that will use R-metrics arima, arch, Garch objects, or at least a vector. Also the arch function has the
2007 Mar 12
1
Export successively displayed graphics
Hello, I am running R version 2.4.1 on Debian. I am using some R functions which produce several graphics displayed successively with an interactive prompt between each graph. For example, the plot.varest (vars) function produces such output (one graph per time series on which the VAR model is fitted). Plots on GARCH models also produce such outputs. Moreover, the frontend I am using for R
2012 Jun 18
0
Obtaining r-squared values from phylogenetic autoregression in ape
Hello, I am trying to carry out a phylogenetic autoregression to test whether my data show a phylogenetic signal, but I keep calculating bizzare R-squared values. My script is: > library(ape) > x <-
2011 Sep 30
0
All subsets vector autoregression with exogenous variables
Hi, I am trying to fit all subsets for a vector autoregression with exogenous variables. I have been looking at the 'leaps' function but I not sure how to get it to work when lags for each variable are included in the model. I would be really appreciative if someone could provide some links to examples. Thanks in advance! -- View this message in context:
2012 Feb 01
0
AutoRegression with Subset of Lags/Coefficients
Hi, In order to produce an autoregression where only certain lags are allowed, specified in advance (e.g. c(1,2,5) ), I have found it necessary to look beyond the standard [ar] function, thankfully discovering the [FitAR] package, wherein the [FitARp] function provided exactly that capability. However for my problem at hand, [FitARp] is vastly slower than [ar] - taking hours rather than minutes.