[R] Results of vcovCL (sandwich) and of cluster() in Stata

2017-08-03 Thread Igor Sosa Mayor
quot; & city != "Wittenberg") # the model m1 <- lm(prot1530 ~ press - 1, data = cities) # the clustered standard errors coeftest(m1, vcov. = vcovCL(m1, cluster=cities$territory)) I tried different types (HC1, HC2, etc), but always the value for the SE is not the same as in th

Re: [R] citation() command doesn't work in R.3.1.1

2014-08-06 Thread Igor Sosa Mayor
mpilation, since as far as I know, the package `base' should be loaded automatically by starting R... -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido :::: ___

Re: [R] Mean of colMeans

2014-05-21 Thread Igor Sosa Mayor
Kate Ignatius writes: > Hi All, > > I've successfully gotten out the colMeans for 60 columns using: > > col <- colMeans(x, na.rm = TRUE, dims = 1) > > My next question is: is there a way of getting a mean of all the > column means (ie a mean of a mean)? maybe m

Re: [R] Cargar csv 16 GB en R

2014-06-02 Thread Igor Sosa Mayor
laura tomé writes: > Hola, > > Estoy todavía dando mis primeros pasos en R y una de las cosas que > tengo que hacer es trabajar con un csv de 16 GB. Consta de 10 > columnas, 7 númericas escribe a la lista en español, que está aquí: https://stat.ethz.ch/mailman/listinfo/r-help-es __

[R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
t;Regueras (Las)"). Others don't. I want to do the following conversion: "Regueras (Las)"---> "Las Regueras" That is: I want to loop through the names, look whether they have a postponed article, extract and delete this article and put it in front of the rest of

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
I have to add some clarification: there are ONLY 4 articles (el,la,los,las) and the structure is always the same: NAMEOFMUNICIPALITY (El) NAMEOFMUNICIPALITY (La) etc. On Tue, Mar 13, 2012 at 10:42:54AM +0100, Igor Sosa Mayor wrote: > Hi R-Users, > > I want to manipulate some strin

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
explanation of the perl expression you wrote (as far as I can understand, the point is this \\3 \\1...). thx again On Tue, Mar 13, 2012 at 11:12:24AM +0100, Berend Hasselman wrote: > > On 13-03-2012, at 10:42, Igor Sosa Mayor wrote: > > > Hi R-Users, > > > > I want to man

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
Berend: 1. 1000 thanks for your help. It works perfectly 2. many thanks for the analysis of the expression; i will try to understand it. Perl is really not easy to read thanks again! On Tue, Mar 13, 2012 at 11:51:49AM +0100, Berend Hasselman wrote: > > On 13-03-2012, at 11:28, Igor Sosa

Re: [R] R-help-es have reached 500 members!

2012-03-13 Thread Igor Sosa Mayor
k). > > Kjetil > > __ > 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, self-contained, rep

Re: [R] How to extend a slot of a class?

2012-03-16 Thread Igor Sosa Mayor
ct). Is there > an elegant way to do this? > Best, > marco > [[alternative HTML version deleted]] > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting

[R] Help with dlply, loop and column names

2012-03-18 Thread Igor Sosa Mayor
', '<- elecregtipos(',y,')',sep=''))) } At the moment I'm getting the error: Error en `[.data.frame`(x, , y) : objeto 'upyd' no encontrado If I call simply: elecregtipos("upyd") it works perfectly. The problem is the loop, column names, e

Re: [R] Help with dlply, loop and column names

2012-03-19 Thread Igor Sosa Mayor
s.gen2011, id=c("municipio", "total", "tipo"), > variable.name="party", value.name="vote") > > dlply(ast, .(party, tipo), lm, formula=vote~total) > > or along those lines. This way you don't have to mess around with past

Re: [R] show and produce PDF file with pdf() and dev.off( ) in function

2012-03-24 Thread Igor Sosa Mayor
gt; 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, self-contained, reproducible code. -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 ::

Re: [R] copy the columns based on the code

2012-03-27 Thread Igor Sosa Mayor
-home.htm > > __ > 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, self-contained, reproduc