Displaying 8 results from an estimated 8 matches for "feanor0".
2008 Jul 02
5
multiplication question
folks,
is there a clever way to compute the sum of the product of two vectors such that the common indices are not multiplied together?
i.e. if i have vectors X, Y, how can i compute
Sum (X[i] * Y[j])
i != j
where i != j
also, what if i wanted
Sum (X[i] * Y[j] * R[i, j])
i != j
where R is a matrix?
thanks,
murali
2007 Feb 16
0
re : array searches
...;
[3,] "09/02/2007" "0"
[4,] "12/02/2007" "1"
[5,] "15/02/2007" "0"
Is that what you want or did I miss it ?!
Hope this helps. Olivier
> essage: 92
> Date: Fri, 16 Feb 2007 10:14:30 +0000
> From: "Murali Menon" <feanor0 at hotmail.com>
> Subject: [R] array searches
> To: r-help at stat.math.ethz.ch
> Message-ID: <BAY113-F191B663BED1069C6C1EDE9EE950 at phx.gbl>
> Content-Type: text/plain; format=flowed
>
> Folks,
>
> I have a dataframe comprising a column of dates and a column of si...
2007 Mar 16
1
cumsum over varying column lengths
Folks,
I have a matrix of historicalReturns, where entry (i, j) is the daily return
corresponding to date i and equity j. I also have a matrix startOffset,
where entry (1, k) is the row offset in historicalReturns where I entered
into equity k.
So we have that NCOL(startOffset) = NCOL(historicalReturns).
Now I would like compute for each column in historicalReturns, the
cumulative return
2007 Feb 16
1
array searches
Folks,
I have a dataframe comprising a column of dates and a column of signals (-1,
0, 1) that looks something like this:
30/01/2007 0
31/01/2007 -1
01/02/2007 -1
02/02/2007 -1
03/02/2007 1
04/02/2007 1
05/02/2007 1
06/02/2007 1
07/02/2007 1
08/02/2007 1
09/02/2007 0
10/02/2007 0
11/02/2007 0
12/02/2007 1
13/02/2007 1
14/02/2007 1
15/02/2007 0
16/02/2007 0
What I need to do is for each signal
2007 Feb 13
2
Computing stats on common parts of multiple dataframes
Folks,
I have three dataframes storing some information about
two currency pairs, as follows:
R> a
EUR-USD NOK-SEK
1.23 1.33
1.22 1.43
1.26 1.42
1.24 1.50
1.21 1.36
1.26 1.60
1.29 1.44
1.25 1.36
1.27 1.39
1.23 1.48
1.22 1.26
1.24 1.29
1.27 1.57
1.21 1.55
1.23 1.35
1.25 1.41
1.25 1.30
1.23 1.11
1.28 1.37
1.27 1.23
R> b
EUR-USD NOK-SEK
1.23 1.22
1.21 1.36
1.28 1.61
1.23 1.34
1.21 1.22
2013 Feb 22
2
Model selection in nonstationary VAR
Folks,
Is there any implementation available in R for the simultaneous selection of lag order and rank of a nonstationary VAR as described in Chao & Phillips (1999): Model selection in partially nonstationary vector autoregressive processes with reduced rank structure, J. Econ. (91).
Or any other systematic procedure for the consistent selection of lag order and cointegration rank?
I
2013 May 24
1
matrix of random variables from a matrix of means and matrix of sd
folks,
if i have a matrix of means:
a <- matrix(1:4, 2)
and a matrix of std deviations:
b <- matrix(5:8, 2)
and i want to create a matrix X of random variates such that X[i, j] is a draw from normal distribution with mean = a[i, j] and std dev = b[i, j], i think i can do this?
X <- matrix(rnorm(4, mean = a, sd = b), ncol = 2)
now if I want to create 10 such matrices, I could possibly do
2007 Apr 27
2
Jarque-Bera and rnorm()
Folks,
I'm a bit puzzled by the fact that if I generate 100,000 standard normal
variates using rnorm() and perform the Jarque-Bera on the resulting vector,
I get p-values that vary drastically from run to run. Is this expected?
Surely the p-val should be close to 1 for each test?
Are 100,000 variates sufficient for this test?
Or is it that rnorm() is not a robust random number generator?