Displaying 6 results from an estimated 6 matches for "a_matrix".
2014 Jun 19
1
Restrict a SVAR A-Model on Matrix A and Variance-Covariance-Matrix
Hello folks!
I'm using R-Package {vars} and I'm trying to estimate an A-Model.
I have serious problems regarding the restrictions.
1) My A-Matrix needs (!) to have the following form:
# 1 NA NA NA
# 0 1 NA NA
# 0 0 1 NA
# 0 0 0 1
That is done in R by:
A_Matrix <- diag(4) # main diagonal = 4 restrictions
A_Matrix [1, 2] <- NA #
A_Matrix [1, 3] <- NA #
A_Matrix [1, 4] <- NA #
A_Matrix [2, 3] <- NA #
A_Matrix [2, 4] <- NA #
A_Matrix [3, 4] <- NA # off diagonal = 6 restrictions
2) The Variance-Covariance-Matrix of the structural resi...
2016 Aug 03
3
Extracting the names of the variables that creates loop-carried dependencies
Hi,
I would like to know if it is possible to extract the source level names
of variables that create loop-carried dependencies.
For example, for the following code:
for (int i = 0; i < A_ROW; i++)
{
for (int j = 1; j < B_COL; j++)
{
a_matrix[i][j] = a_matrix[i][j - 1];
}
}
I get the following AST:
#pragma omp parallel for
for (int c0 = 0; c0 <= 31; c0 += 1)
#pragma minimal dependence distance: 1
for (int c1 = 0; c1 <= 30; c1 += 1)
Stmt_for_body5(c0, c1);
As expected the...
2009 Sep 17
2
What is the best way to get a subset of a data.frame?
Hi,
I want to construct a data.frame 'y' by using x$x and x$y. I think
that there might be better ways to do it (because, for example, we can
use a_matrix[3:5,] to extract certain rows, where 'a_matrix' is a
matrix). Can somebody let know what the best way is?
> a=data.frame(x=1:10,y=rep("abc",10),z=rep("xyz",10))
> a
x y z
1 1 abc xyz
2 2 abc xyz
3 3 abc xyz
4 4 abc xyz
5 5 abc xyz
6 6 abc xyz
7...
2016 Aug 05
0
Extracting the names of the variables that creates loop-carried dependencies
...bles that create loop-carried dependencies.
>>>
>>> For example, for the following code:
>>>
>>> for (int i = 0; i < A_ROW; i++)
>>> {
>>> for (int j = 1; j < B_COL; j++)
>>> {
>>> a_matrix[i][j] = a_matrix[i][j - 1];
>>> }
>>> }
>>>
>>> I get the following AST:
>>>
>>> #pragma omp parallel for
>>> for (int c0 = 0; c0 <= 31; c0 += 1)
>>> #pragma minimal dependence distance:...
2012 Sep 09
3
how to save a heatmap.2 in png /jpeg /tiff
...p.2.jpeg) # it works once every 10 times, but it's a 22kb file. completely use less !!!
I really need to have high quality image, as I will have to work on photoshop and also I will have to cut and zoom in just some lines of my heatmap.
#here is the code I use for my heatmap.2 :
>heatmap.2(a_matrix, Rowv=NA, Colv =NA, col=greenred(60), scale="column", margins=c(7,10), trace="none", density.info=c("none"))
Does someone know what I have to do in order to get my heatmap.2.png ??? Do I need some other package (I only use gplots, to allow the heatpmap.2)
THANKS for...
2002 Sep 26
3
error with complex solve (PR#2068)
Full_Name: John Peters
Version: 1.5.1
OS: Windows 2000
Submission from: (NULL) (130.155.2.3)
solve(a,b) with two arguments gives an error if a is complex and b is a vector:
> a_matrix(c(1,2+3i,3,2),ncol=2)
> a
[,1] [,2]
[1,] 1+0i 3+0i
[2,] 2+3i 2+0i
> b_c(2,2+1i)
> solve(a,b)
Error in solve.default(a, b) : A must be a complex matrix
> is.complex(a)
[1] TRUE
> is.matrix(a)
[1] TRUE
> solve(a,diag(b))
[,1] [,2]
[1,...