)
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
Thanks! I did not realize you can access variables by name like this.
Serguei
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
, for
example to compute
gdp_w - gdp_i
inf_w - inf_i
unp_w - unp_i
or
gdp - gdp_w
inf - inf_w
unp - unp_w
without needing to code each difference separately?
Thanks for your help!
Serguei Kaniovski
[[alternative HTML version deleted]]
__
R-help@r
Hello!
When I estimate a glm gamma model using the canonical link (inverse), I
get the opposite signs on almost all coefficients compared to the same
model (i.e. with the same linear predictor) estimated using other suitable
links (log, logit).
What confuses me is that most of sources quote
” equally
often.
Can you help?
Thanks a lot!
Serguei Kaniovski
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal
this happens, as tabulate does not work on lists.
The answer, of course, should be that equal weights are “decisive”
equally
often.
Can you help?
Thanks a lot!
Serguei Kaniovski
__
R-help@r-project.org mailing list
https://stat.ethz.ch
Hello All,
I am trying to estimate a generalized linear model using a single dummy
variable (bilat). I want to use contr.sum, in which (please correct me if I
am wrong) the implicit coefficient on the contrast equals the negative of
the sum of all estimated coefficients.
I cannot get the
I apologize for not being specific enough in my previous posting. Assume
you have panel data in the form:
df - data.frame( cbind( rep( c( AUT , BEL , DEN , GER ) , 4) ,
cbind( rep( c( 1999 , 2000 , 2001 , 2002 ) , 4 ) ), sample( 10 , 16 ,
replace=T) ) )
names(df) - c( country , year , x )
Ok I see how to sort the factors, but how do I compute the correlation
matrix in a repeated observations dataset (see the first part of my
question)
Thanks again for your help!
Serge
__
R-help@r-project.org mailing list
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
__
R-help@r
this can be accomplished with Lagrange multipliers and an optimization
routine.
Thanks a lot!
Serguei Kaniovski
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
the value of 1 when
the country is in the pair and 0 otherwise, i.e.
“Bilat”, “d_GER”, “d_USA”, “d_JAP”
GER_USA, 1, 1, 0
GER_JAP, 1, 0, 1
USA_JAP, 0, 1, 1
These contrasts highlight the effect of having a given country in the pair.
Thank you for your help!
Serguei Kaniovski
Dear All!
my data is on pairs of countries, i and j, e.g.:
y,i,j
1,AUT,BEL
2,AUT,GER
3,BEL,GER
I would like to create a dummy (indicator) variable for use in regression
(using factor?), such that it takes the value of 1 if the country is in the
pair (i.e. EITHER an i-country OR an j-country).
Bernardo: this is not quite what I am looking for,
Let the data be:
y,i,j
1,AUT,BEL
2,AUT,GER
3,BEL,GER
then the dummies sould look like:
y,i,j,d_AUT,d_BEL,d_GER
1,AUT,BEL,1,1,0
2,AUT,GER,1,0,1
3,BEL,GER,0,1,1
I can generate the above dummies but can this design be imputed in a
reg. model
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
Kaniovski [EMAIL PROTECTED] wrote:
From: Serguei Kaniovski [EMAIL PROTECTED]
Subject: [R] Vertex enumeration and center of mass for convex polytops
To: [EMAIL PROTECTED]
Received: Wednesday, 1 October, 2008, 10:00 PM
Dear All!
I am looking for a package that contains routines for
vertex
Dear All!
I am looking for a package that contains routines for vertex enumeration
and center of mass computation for convex polytops.
Thanks in advance,
Serguei Kaniovski
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
Hello,
how can I fit a three, as opposed to a two parameter Gamma distribution,
i.e. one in which shape and rate are not tied.
Thanks,
Serguei
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Hallo all,
I am looking for an R implementation of the four parameter kappa
distribution (cdf, pdf, quantile, and ransom numbers), or at a minimum,
the generalized logistic distribution.
Any suggestions?
Thank you very much,
Serguei
__
Hallo All,
I have difficulties understanding how factors work in R. Suppose a have
data in the panel form below. I would to compute a correlation coefficient
(actually apply a different function of two time series) in the V variable
between members of the two sexes in each city over time. How
Arizona,2004,0.36
Thank you in advance for your help,
Serguei Kaniovski
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented
Hello,
how to compute the between sum of squares the for the clusters obtained by
kmeans for the example below? I would like to compute the SSB-SSW based
information measures for the clusters, as implemented in cclust, but I am
getting an error message.
Serguei
x1,x2,x3,x4,x5,cl
Hello,
when kmeans draws random vectors for the initial centroids, does it then
select the clustering that has emerged most frequently?
Serguei
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
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
Hello,
how is, for example, the Schwarz criterion is defined for kmeans? It should
be something like:
k - 2
vars - 4
nobs - 100
dat - rbind(matrix(rnorm(nobs, sd = 0.3), ncol = vars),
matrix(rnorm(nobs, mean = 1, sd = 0.3), ncol = vars))
colnames(dat) - paste(var,1:4)
(cl -
Hallo,
suppose I have a vector:
x - c(1,1,1,2,2,3,3,3,3,3,4)
How can I generate a vector/sequence in which a fixed number of zeroes (say
3) is inserted between the consecutive values, so I get
1,1,1,0,0,0,2,2,0,0,0,3,3,3,3,3,0,0,0,4
thanks a lot,
Serguei
[[alternative HTML version
of their 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
Hallo,
I have two vectors of different lengths which contain the same set of
values:
X -c(2,6,1,7,4,3,5)
Y - c(1,1,6,4,6,1,4,1,2,3,6,6,1,2,4,4,5,4,1,7,6,6,4,4,7,1,2)
How can I replace the values in Y with the index (!) of the corresponding
values in X. So 2 appears in X in the first
?
Thanks for help,
Serguei Kaniovski
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
Hallo
From a variable x that defines, say, four classes, I would like to define
the matrix mat of dummy variables indicating the classes, i.e.
x - c(1,1,1,1,2,2,2,3,3,3,4,4)
mat - matrix(c(1,0,0,0,
1,0,0,0,
1,0,0,0,
1,0,0,0,
0,1,0,0,
0,1,0,0,
0,1,0,0,
0,0,1,0,
0,0,1,0,
0,0,1,0,
0,0,0,1,
Dear All,
I have several socio-economic and geographic variables for the 27 EU
countries. I would to use these data to derive a correlation matrix between
groups of countries (for a different application).
I thought of using kmeans to cluster the groups, and then calibrate between
group
To Walter,
I am building a model of voting in the EU Council of Ministers. A voting
scenario assumes the probabilities of yes votes, possible different for
each country, and correlation coefficient between them.
The country variables (data) reflect the background characteristics that
are
32 matches
Mail list logo