Description Usage Arguments Details Value Examples
View source: R/PleioSeq.test.R
The factor models for asset return through a linear function are commonly used in the description of asset returns in finance. Also consider the following multivariate linear regression model:
y_j = α_j + ∑_{k=1}^q β_{jk}x_k + \varepsilon_j, j=1,...,p.
where y_j denotes the excess return on asset j; (x_1,...,x_q) is the excess return on the porfolio whose efficiency is being tested; and \varepsilon_j is the disturbance term for asset j. The disturbances are assumed to be jointly normally distributed with mean zero and nonsingular covariance matrix Σ, conditional on the excess returns for portfolios (x_1,...,x_q).
1 | PleioSeq.test(x, y)
|
x |
samples of predictor which is a n*q matrix. |
y |
samples of response which is a n*p vector. |
Sequential testing provides a rigorous procedure to evaluate the number of economic quantities associated with a fundamental economic factor. Thus we consider a sequential hypothesis test:
H0k
: there is no more than k
nonzero α_j (j=1,...,p).
H1
: otherwise.
A list with the following elements:
pvalue
: the p-value of the sequential test.
k.test
: the number of nonzero α_j (j=1,...,p).
index
: the corresponding indexs of nonzero α_j (j=1,...,p).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Quick example for the sequential test of the efficiency of a given portfolio
set.seed(1)
n = 500; q = 2; p = 3
x <- matrix( rnorm(n*q), nrow = n)
# Generate data under H0
y <- matrix(NA, nrow = n, ncol = p)
y[,1] <- x[,1] + x[,2] + rnorm(n, sd = 0.5)
y[,2] <- x[,1] + 2 * x[,2] + rnorm(n, sd = 0.5)
y[,3] <- x[,1] + 3 * x[,2] + rnorm(n, sd = 0.5)
PleioSeq.test(x,y)
# Generate data under H01
y <- matrix(NA, nrow = n, ncol = p)
y[,1] <- 1 + x[,1] + x[,2] + rnorm(n, sd = 0.5)
y[,2] <- x[,1] + 2 * x[,2] + rnorm(n, sd = 0.5)
y[,3] <- x[,1] + 3 * x[,2] + rnorm(n, sd = 0.5)
PleioSeq.test(x,y)
# Generate data under H02
y <- matrix(NA, nrow = n, ncol = 3)
y[,1] <- 1 + x[,1] + x[,2] + rnorm(n, sd = 0.5)
y[,2] <- 1 + x[,1] + 2 * x[,2] + rnorm(n, sd = 0.5)
y[,3] <- x[,1] + 3 * x[,2] + rnorm(n, sd = 0.5)
PleioSeq.test(x,y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.