Displaying 20 results from an estimated 47 matches for "kaniovski".
2006 Dec 14
3
Delete all dimnames
...0 0 0 0 0 0 0 1
is displayed with [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] in rows, and the
same in columns. The matrix was generated using "apply"
Serguei
___________________________________________________________________
Austrian Institute of Economic Research (WIFO)
Name: Serguei Kaniovski P.O.Box 91
Tel.: +43-1-7982601-231 Arsenal Objekt 20
Fax: +43-1-7989386 1103 Vienna, Austria
Mail: Serguei.Kaniovski@wifo.ac.at A-1030 Wien
http://www.wifo.ac.at/Serguei.Kaniovski
[[alternative HTML version deleted]]
2007 Nov 28
4
Replacing values job
...dinate, so all 2’s in Y
should be replaced by 1, etc.
Thank you for your help,
Serguei
________________________________________
Austrian Institute of Economic Research (WIFO)
P.O.Box 91 Tel.: +43-1-7982601-231
1103 Vienna, Austria Fax: +43-1-7989386
Mail: Serguei.Kaniovski@wifo.ac.at
http://www.wifo.ac.at/Serguei.Kaniovski
[[alternative HTML version deleted]]
2005 Nov 23
2
vector of permutated products
...to do without temp1 and temp2. To have something like
result<-apply(permat*x-(permat-1)*x,1,prod)
My problem is that permat*x does not produce permat*temp1 due to the way
the element-by-element multiplication works in R. Can you help to
simplify the above code?
Thank you in advance,
Serguei Kaniovski
--
___________________________________________________________________
Austrian Institute of Economic Research (WIFO)
Name: Serguei Kaniovski P.O.Box 91
Tel.: +43-1-7982601-243 Arsenal Objekt 20
Fax: +43-1-7989386 1103 Vienna, Austria
Mail: Serguei.Kaniovski at wifo.ac.at
http://www.wifo...
2007 Feb 06
1
Questions on counts by case
...mposition by
people, then save each portion in a separate file,
2. compute the frequency of "1"'s in "x" for each person by group
"gr". So, "mike" will have freq=2/3, as he has two "1" and one "0" in 3
groups.
Thanks a lot,
Serguei Kaniovski
The data looks like:
person;gr;x
mike;gr1;1
jane;gr1;0
bill;gr1;0
jack;gr2;1
mike;gr2;1
jane;gr2;0
bill;gr2;0
alex;gr2;1
james;gr2;1
mike;gr3;0
bill;gr3;1
jane;gr3;1
___________________________________________________________________
Austrian Institute of Economic Research (WIFO)
N...
2006 Sep 22
3
Compiling a contingency table of counts by case
...the first has "x=0" - the second has "x=1",
c. the first has "x=1" - the second has "x=0",
d. both have "x=0",
The difficulty is that the number of "names" and their
identity changes from case to case.
Thanks a lot for you help,
Serguei Kaniovski
--
___________________________________________________________________
Austrian Institute of Economic Research (WIFO)
Name: Serguei Kaniovski P.O.Box 91
Tel.: +43-1-7982601-231 Arsenal Objekt 20
Fax: +43-1-7989386 1103 Vienna, Austria
Mail: Serguei.Kaniovski at wifo.ac.at
http://www.wifo...
2005 Dec 04
4
Construct a data.frame in a FOR-loop
Say I have a FOR-loop for computing powers (just a trivial example)
for(i in 1:5)
{
x<-i^2
y<-i^3
}
How can I create a data.frame and a 3D plot of (i,x(i),y(i)), i.e. for
each iteration
Thanks,
Serguei Kaniovski
--
___________________________________________________________________
??sterreichisches Institut f??r Wirtschaftsforschung (WIFO)
Name: Serguei Kaniovski Postadresse: Postfach 91
Tel.: +43-1-7982601-231 A-1103 Wien
Fax : +43-1-7989386 Stando...
2007 Nov 28
1
Order observations in a dataframe
...heir cumulative "weight",
which wound be:
country;weight;group
fra;29;1
ita;29;1
gbr;29;1
bul;10;2
cze;12;2
grc;12;2
hun;12;2
prt;12;2
rom14;2
aut;10;3
bel;12;3
The first group has the largest sum of weights, the second, with the second
largest, and so on.
Thanks for your help,
Serguei Kaniovski
________________________________________
Austrian Institute of Economic Research (WIFO)
P.O.Box 91 Tel.: +43-1-7982601-231
1103 Vienna, Austria Fax: +43-1-7989386
Mail: Serguei.Kaniovski@wifo.ac.at
http://www.wifo.ac.at/Serguei.Kaniovski
[[alternative HTML versio...
2006 Jul 18
2
A contingency table of counts by case
...ot;,
c. the first has "0" - the second has "0",
d. both have "0".
There will be choose(9,2) sums, denoted s_ij for 1<=i<j<=9,
where i and j are running indices for an "id"-pair.
Please help, this is way beyond my knowledge of R!
Thank you,
Serguei Kaniovski
--
___________________________________________________________________
Austrian Institute of Economic Research (WIFO)
Name: Serguei Kaniovski P.O.Box 91
Tel.: +43-1-7982601-231 Arsenal Objekt 20
Fax: +43-1-7989386 1103 Vienna, Austria
Mail: Serguei.Kaniovski at wifo.ac.at
http://www.wifo...
2007 Feb 26
1
Adding duplicates by rows
...(duplicated(rownames(mat))),]
return only half of the required indices. How can I find the remaining
ones, ie the matches, so that I can add them up?
Thanks,
Serguei
___________________________________________________________________
Austrian Institute of Economic Research (WIFO)
Name: Serguei Kaniovski P.O.Box 91
Tel.: +43-1-7982601-231 Arsenal Objekt 20
Fax: +43-1-7989386 1103 Vienna, Austria
Mail: Serguei.Kaniovski@wifo.ac.at A-1030 Wien
http://www.wifo.ac.at/Serguei.Kaniovski
[[alternative HTML version deleted]]
2008 Dec 24
1
Implementing a linear restriction in lm()
Dear All!
I want to test a coeffcient restriction beta=1 in a univariate model lm
(y~x). Entering
lm((y-x)~1) does not help since anova test requires the same dependent
variable. What is the right way to proceed?
Thank you for your help and marry xmas,
Serguei Kaniovski
________________________________________
Austrian Institute of Economic Research (WIFO)
P.O.Box 91 Tel.: +43-1-7982601-231
1103 Vienna, Austria Fax: +43-1-7989386
Mail: Serguei.Kaniovski@wifo.ac.at
http://www.wifo.ac.at/Serguei.Kaniovski
[[alternative HTML version...
2006 Oct 03
1
Reshape into a contingency table/Fisher's test
...e the original format, ie
John.Mike
John.Jim
John.Steve
Mike.Jim
Mike.Steve
Jim.Steve
with two columns containing the p-values of the tests.
Thanks a lot,
Serguei
--
___________________________________________________________________
Austrian Institute of Economic Research (WIFO)
Name: Serguei Kaniovski P.O.Box 91
Tel.: +43-1-7982601-231 Arsenal Objekt 20
Fax: +43-1-7989386 1103 Vienna, Austria
Mail: Serguei.Kaniovski at wifo.ac.at
http://www.wifo.ac.at/Serguei.Kaniovski
2006 Dec 04
1
Count cases by indicator
...093/0473;1
093/0473;1
093/0473;1
093/0473;1
093/0473;1
093/0473;1
093/0499;0
093/0499;0
093/0499;1
093/0499;1
093/0499;1
093/0499;1
093/0499;1
093/0499;1
093/0499;1
--
___________________________________________________________________
Austrian Institute of Economic Research (WIFO)
Name: Serguei Kaniovski P.O.Box 91
Tel.: +43-1-7982601-231 Arsenal Objekt 20
Fax: +43-1-7989386 1103 Vienna, Austria
Mail: Serguei.Kaniovski at wifo.ac.at
http://www.wifo.ac.at/Serguei.Kaniovski
2009 Jun 26
3
Compute correlation matrix for panel data with specific ordering
...compute the correlation between countries in the variable "x"
in such a way that the rows & columns of the resulting correlation
matrix are not in an alphabetical order but in the order of a given
factor vector - here SORT.
How can I do this? Greatly appreciate any help!
Serguei Kaniovski
2006 Mar 03
3
Two quick questions
...where all three are integers?
2. I have a dataframe by date and sector. I would like to add-up all
entries for all variable with identical date and sector, replacing the
original entries, i.e. emulate the STATA command "collapse (sum) var1
var2 var3, by(date sector)".
Thank you,
Serguei Kaniovski
2007 Dec 05
1
Information criteria for kmeans
...at, k))
schwarz <- sum(cl$withinss)+ vars*k*log(nobs)
Thanks for your help,
Serguei
________________________________________
Austrian Institute of Economic Research (WIFO)
P.O.Box 91 Tel.: +43-1-7982601-231
1103 Vienna, Austria Fax: +43-1-7989386
Mail: Serguei.Kaniovski@wifo.ac.at
http://www.wifo.ac.at/Serguei.Kaniovski
[[alternative HTML version deleted]]
2005 Dec 03
1
Correlation matrix from a vector of pairwise correlations
...corr(1,2)=0.1, corr(1,3)=0.2, corr(2,3)=0.3, corr(3,4)=0.4
How can I construct the corresponding correlation matrix?
I tried using the "combn"-function in "combinat" package:
library(combinat)
combn(c(0.1,0.2,0.3,0.4),2)
, but to no avail...
Thank you for your help,
Serguei Kaniovski
--
___________________________________________________________________
??sterreichisches Institut f??r Wirtschaftsforschung (WIFO)
Name: Serguei Kaniovski Postadresse: Postfach 91
Tel.: +43-1-7982601-231 A-1103 Wien
Fax : +43-1-7989386 Stando...
2007 Nov 22
2
Vectorize a correlation matrix
...atrix from an (ordered) vector of
correlation coefficients as follows:
x <- c(0.1,0.2,0.3,0.4,0.5)
n <- length(x)
cmat <- diag(rep(0.5,n))
cmat[lower.tri(cmat,diag=0)] <- x
cmat <- cmat+t(cmat)
But how to do the reverse operation, i.e. produce x from cmat?
Thanks for help,
Serguei Kaniovski
[[alternative HTML version deleted]]
2008 Jan 14
2
Permutations of variables in a dataframe
Hallo All,
I would like to apply a function to all permutations of variables in a
dataframe (except the first). What is the best way to achieve this?
I produce the permutations using:
nvar <- ncol(dat) - 1
perms <- as.matrix( expand.grid(rep( list(1:0) , nvar ))[ , nvar:1] )
Thanks in advance
Serguei
Test-dataframe, comma-delimited:
code,wav,w,area,gdp,def,pop,coast,milspend,agr
2008 Jan 29
1
Correlation matrix for data in long format
...tion matrix
in the variable "x" between the states? The data is in long format, e.g.:
state,year,x
Alabama,2001,0.45
Alabama,2002,0.47
Alabama,2003,0.48
Alabama,2004,0.44
Arizona,2001,0.34
Arizona,2002,0.32
Arizona,2003,0.38
Arizona,2004,0.36
Thank you in advance for your help,
Serguei Kaniovski
2011 Oct 19
1
Estimating bivariate normal density with constrains
...meanvector (mu,-mu))
sigma_1 and sigma_2 (two sd deviations)
rho (correlation coefficient)
I have looked at several packages, including Gaussian mixture models in
Mclust, but I am not sure what is the best way, or the best package to use
for this task.
Greatly appreciate any suggestions!
Serguei Kaniovski
________________________________________
Austrian Institute of Economic Research (WIFO)
P.O.Box 91 Tel.: +43-1-7982601-231
1103 Vienna, Austria Fax: +43-1-7989386
Mail: Serguei.Kaniovski@wifo.ac.at
http://www.wifo.ac.at/Serguei.Kaniovski
[[alternative HTML version...