Biology Reference
In-Depth Information
If the type argument is set to "PT.adjusted" , the Portmanteau test is com-
puted; the Breusch-Godfrey test is computed if type is set to "BG" .
In addition, the univariate and multivariate ARCH-LM tests for heteroscedastic-
ity are implemented in arch.test .
> arch.test(var.2c)
ARCH (multivariate)
data: Residuals of VAR object var.2c
Chi-squared = 538.8897, df = 500, p-value = 0.1112
As was the case for normality.test , by default only the multivariate test is
computed. We can set multivariate.only to FALSE to compute the univariate
tests as well.
> arch.test(var.2c, multivariate.only = FALSE)
For a complete overview of the functionality implemented in vars , we refer the
reader to Pfaff ( 2008a , b ).
3.5.2 LASSO Learning: lars and simone
Several implementations of LASSO are available in R ; in the following, we will use
the lars package developed by Hastie and Efron ( 2012 ). Other possible choices are
glmnet by Friedman et al. ( 2010 )and penalized by Goeman ( 2012 ).
> library(lars)
Consider the arth800 MTS data set from the GeneNet package. arth800 de-
scribes the temporal expression of 800 genes of the Arabidopsis thaliana during the
diurnal cycle. In the following example, we will consider a subset arth12 of 12
genes.
> library(GeneNet)
> data(arth800)
> subset = c(60, 141, 260, 333, 365, 424, 441, 512,
+ 521, 578, 789, 799)
> arth12 = arth800.expr[, subset]
Model estimation is performed using the lars function for a target variable
specified by a vector ( y ) and a set of possible parents specified by a matrix of pre-
dictors ( x ). The arth800 data set is composed of 2 time series of 11 time points
each: there are two repeated measurements for each time point. Suppose we want to
estimate a VAR(1) process. Consequently, we removed the two repeated measure-
ments for the first time point from y and the two repeated measurements for the
last time point from x ; they cannot be used for the LASSO due to the lack of the
corresponding time points in x and y , respectively.
Search WWH ::




Custom Search