Re: [R] Amelia, Zelig and latex in R

2013-08-18 Thread Francesco Sarracino
at 11:18 AM, Francesco Sarracino f.sarrac...@gmail.com wrote: Hi Christopher, thanks for your reply. Unfortunately, that's not what I am looking for. I would like to have a table with the results of the two models (lm.imputed1 and lm.imputed2) in two separate columns. According to stargazer

Re: [R] Amelia, Zelig and latex in R

2013-08-18 Thread Francesco Sarracino
].1,paste(lm2[,2],.,sep= ),lm2[,2] ## ONE OPTIONS ## lms - as.data.frame(cbind(lm1[,1],lm2[,1],lm1[,2],lm2[,2])) rownames(lms) - rownames(lm1) colnames(lms) - c(Imp1.Est,Imp2.Est,Imp1.SE,Imp2.SE) xtable(lms) ## OR ## xtable(cbind(lm1[,1:2],lm2[,1:2])) -- Francesco Sarracino, Ph.D

[R] Amelia, Zelig and latex in R

2013-08-17 Thread Francesco Sarracino
Dear listers, I am running some OLS on multiply imputed data using Amelia. I first imputed the data with Amelia. than I run a OLS using Zelig to obtain a table of results accounting for the multiply imputed data-sets. And I'd like to do this for various models. Finally, I want to output all the

Re: [R] Amelia, Zelig and latex in R

2013-08-17 Thread Francesco Sarracino
, Aug 17, 2013 at 6:37 AM, Francesco Sarracino f.sarrac...@gmail.com wrote: Dear listers, I am running some OLS on multiply imputed data using Amelia. I first imputed the data with Amelia. than I run a OLS using Zelig to obtain a table of results accounting for the multiply imputed data-sets

Re: [R] problems with coercing a factor to be numeric

2013-01-24 Thread Francesco Sarracino
Dear Ellison, thanks a lot for your reply. Your explanation makes things much clearer. Sincerely, f. On 24 January 2013 05:58, S Ellison s.elli...@lgcgroup.com wrote: On 23 Jan 2013, at 21:36, Francesco Sarracino f.sarrac...@gmail.com wrote: what I meant refers to the fact

[R] problems with coercing a factor to be numeric

2013-01-23 Thread Francesco Sarracino
and not 0.5 as expected. What am I doing wrong? Thanks in advance for your kind support, f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] problems with coercing a factor to be numeric

2013-01-23 Thread Francesco Sarracino
of NA. Any ideas? f. On 23 January 2013 10:39, D. Rizopoulos d.rizopou...@erasmusmc.nl wrote: Check R FAQ 7.10: How do I convert factors to numeric? I hope it helps. Best, Dimitris On 1/23/2013 10:33 AM, Francesco Sarracino wrote: Dear R listers, I am trying to compute the mean

Re: [R] problems with coercing a factor to be numeric

2013-01-23 Thread Francesco Sarracino
...@erasmusmc.nl wrote: check also pp - rep(0:1, 10) pp - factor(pp, levels=(0:1), labels=c(no,yes)) unclass(pp) unclass(pp) - 1 Best, Dimitris On 1/23/2013 10:48 AM, Francesco Sarracino wrote: Dear Dimitris, thanks for your quick reply. I've tried the solutions proposed in 7.10 How do

Re: [R] problems with coercing a factor to be numeric

2013-01-23 Thread Francesco Sarracino
that your labels are no and yes, what do you expect R to do? To quote a well-known fortune, R is lacking a mind_read() function! cheers, Rolf Turner On 01/23/2013 10:58 PM, Francesco Sarracino wrote: Thanks, this works! but I am surprised that R has such a strange behavior

Re: [R] how to label two figures in the same chunk independently with knitr

2013-01-09 Thread Francesco Sarracino
-- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Jan 8, 2013 at 4:17 AM, Francesco Sarracino f.sarrac...@gmail.com wrote: Dear R helpers, I am using knitr to run analysis with R

[R] ggplot not showing all the years on the x-axis

2013-01-08 Thread Francesco Sarracino
Dear R helpers, I am currently having hard time fixing the values on the x-axis of a plot with ggplot: even though I have 12 years, ggplot plots only 3 of them. Here is my example: library(ggplot2) ii - 2000:2011 ss - rnorm(12,0,1) pm - data.frame(ii,ss) tmpplot - ggplot(pm, aes(x = ii, y = ss))

Re: [R] ggplot not showing all the years on the x-axis

2013-01-08 Thread Francesco Sarracino
that: plot - tmpplot + geom_line()+scale_x_continuous(breaks=ii) Yao He 2013/1/8 Francesco Sarracino f.sarrac...@gmail.com: Dear R helpers, I am currently having hard time fixing the values on the x-axis of a plot with ggplot: even though I have 12 years, ggplot plots only 3 of them. Here

[R] how to label two figures in the same chunk independently with knitr

2013-01-08 Thread Francesco Sarracino
for your kind help, f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[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] Oaxaca-Blinder decomposition in R

2013-01-08 Thread Francesco Sarracino
Dear R-listers, does anybody know of any package developed to implement the Oaxaca-Blinder decomposition in R? I've been googling around and my reserch has been unfruitful. The latest news I've found were 1 year old. Does anybody know of any recent development? Has R ever been employed to run a

[R] Esttab error while exporting regression results

2012-12-23 Thread Francesco Sarracino
is going on? Thanks in advance for your help , f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] how to recode an ordered factor

2012-12-21 Thread Francesco Sarracino
? thanks in advance, f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[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] texreg error while exporting regression table

2012-12-21 Thread Francesco Sarracino
in advance, f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[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

[R] how to control the naming of factors in regression

2012-12-21 Thread Francesco Sarracino
label - in Stata dictionary). Moreover, the little hat in o.particip^4 drives latex nuts. Any ideas on how to fix these things? Thank you very much for your kind help, f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[alternative HTML version deleted

[R] how to make a table of summary statistics

2012-12-20 Thread Francesco Sarracino
Dear R-listers, I am a newbie with R and I am struggling with something I consider very basic. I wish to produce a table (to import in a latex file) of summary statistics, but for as much as I've been looking around and trying various alternatives (plyr, reporttools, pastecs and Hmisc) I haven't

[R] equivalent of group command of the egen function in Stata

2012-12-10 Thread Francesco Sarracino
) I am trying to build a fifth one (let's say: group_id) to uniquely identify groups of observations as defined by dim1, dim2 and dim3, i.e. 30 groups. can you please help me figuring out how to do it? thanks in advance, f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino

[R] problems reading a large dta dataset in R

2012-03-05 Thread Francesco Sarracino
Dear R listers, I have a silly problem. I am trying to load a dta (Stata) file in R. The dta is about 650 MB and contains the integrated World Values Survey/ European Value Study data-set. My problem is that I don't manage to load the file. After almost 3 hours after I issued the following

[R] R can't load a large dataset

2012-02-29 Thread Francesco Sarracino
Dear R listers, I have a silly problem. I am trying to load a dta (Stata) file in R. The dta is about 650 MB and contains the integrated World Values Survey/ European Value Study data-set. My problem is that I don't manage to load the file. After almost 1 hour I issued the following command: data

[R] labels in a boxplot

2011-10-12 Thread Francesco Sarracino
Dear R-listers, I have a little problem with a boxplot and I hope you can help me figuring it out. I'll try to make up some data to illustrate the issue. Sorry, if my procedures look naive, but these are my first steps in R. Any comments and/or suggestions are very welcome. let's create a vector

Re: [R] labels in a boxplot

2011-10-12 Thread Francesco Sarracino
Thanks a lot Andrés. It was easier than I expected. f. 2011/10/12 Andrés Aragón armand...@gmail.com Francesco, Try cex.axis=0.6 Regards, Andrés AM 2011/10/12, Francesco Sarracino f.sarrac...@gmail.com: Dear R-listers, I have a little problem with a boxplot and I hope you can help

Re: [R] labels in a boxplot

2011-10-12 Thread Francesco Sarracino
Hi Petr, thanks a lot for your reply. Unfortunately, your suggestion does not work for me. I even tried larger boxes such as 15,15 , but the result does not change. Is there some setting that I am missing? However, once more thanks a lot for your help. f. On 12 October 2011 15:58, Petr PIKAL

[R] regression with ordered arguments

2011-09-27 Thread Francesco Sarracino
Dear R listers, I am trying to be a new R user, but life is not that easy. My problem is the following one: let's assume to have 3 outcome variables (y1, y2, y3) and 3 explanatory ones (x1, x2, x3). How can I run the following three separate regressions without having to repeat the lm command

Re: [R] regression with ordered arguments

2011-09-27 Thread Francesco Sarracino
Dear Petr, thank you so much for your quick reply. I was sure that there were some smart ways to address my issue. I went through it and took some time to look at the help for lapply and mapply. However, some doubts still remain. Following your example, I did: lll -vector(mode = list, length = 3)

Re: [R] regression with ordered arguments

2011-09-27 Thread Francesco Sarracino
That's cool! it works :-))) for me (as a stata user) these are quite basic things and I didn't find them anywhere for what concerns R. I can't figure out why. Really, thank you so much, f. On 27 September 2011 14:20, Petr PIKAL petr.pi...@precheza.cz wrote: Hi Francesco Dear Petr,

[R] troubles with a for loop

2011-09-18 Thread Francesco Sarracino
Dear all, I am a stata user and I am moving my first steps in R. I am dealing with a silly issue concerning looping over variables. I read previous posts on similar topics in the R help archive, but I did not find a solution. Here is my case: I run a simple bivariate linear regression saving the

Re: [R] troubles with a for loop

2011-09-18 Thread Francesco Sarracino
://r4stats.com On 18/09/2011 17:05, Francesco Sarracino wrote: Dear all, I am a stata user and I am moving my first steps in R. I am dealing with a silly issue concerning looping over variables. I read previous posts on similar topics in the R help archive, but I did not find a solution. Here