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

2013-08-18 Thread Francesco Sarracino
;*",sep=" "), > ifelse(lm2[,4]<.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(l

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

2013-08-18 Thread Francesco Sarracino
estimated parameters >> from all imputation runs? >> >> Chris >> >> >> On Sat, Aug 17, 2013 at 11:18 AM, Francesco Sarracino < >> f.sarrac...@gmail.com> wrote: >> >>> Hi Christopher, >>> thanks for your reply. Unfortunate

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

2013-08-17 Thread Francesco Sarracino
> } > > # xtable > for(i in 1:m){ > print(xtable(summary(lm.imputed1[[i]]))) > print(xtable(summary(lm.imputed2[[i]]))) > } > > > On Sat, Aug 17, 2013 at 6:37 AM, Francesco Sarracino < > f.sarrac...@gmail.com> wrote: > >> Dear listers, >> >

[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 mo

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 wrote: > > > On 23 Jan 2013, at 21:36, "Francesco Sarracino" > wrote: > > > what I meant refers to the fact that I&

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

2013-01-23 Thread Francesco Sarracino
urner wrote: > > Given 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, Frances

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

2013-01-23 Thread Francesco Sarracino
t; 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, > &g

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

2013-01-23 Thread Francesco Sarracino
the output is a vector of NA. Any ideas? f. On 23 January 2013 10:39, D. Rizopoulos 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 li

[R] problems with coercing a factor to be numeric

2013-01-23 Thread Francesco Sarracino
. Indeed, the result is 1.5 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

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

2013-01-09 Thread Francesco Sarracino
r.com/4lKpw.png > > Regards, > Yihui > -- > Yihui Xie > 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 > wrote: > > Dear

[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 Oa

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

2013-01-08 Thread Francesco Sarracino
Dear R helpers, I am using knitr to run analysis with R and edit my document with Latex. I am wondering whether there is a way to include 2 or more pictures per chunk and being able to refer them in the text independently and eventually whether it is possible to give them different captions. Let m

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

2013-01-08 Thread Francesco Sarracino
; plot <- tmpplot + geom_line()+scale_x_continuous(breaks=ii) > > > Yao He > > > 2013/1/8 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

[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 = s

[R] Esttab error while exporting regression results

2012-12-23 Thread Francesco Sarracino
nderstand what's going on. Does anybody have any ideas about what 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-h

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

2012-12-21 Thread Francesco Sarracino
the level (the value 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/

[R] texreg error while exporting regression table

2012-12-21 Thread Francesco Sarracino
ber of dimensions Any ideas about what am I doing wrong? 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

[R] how to recode an ordered factor

2012-12-21 Thread Francesco Sarracino
levels option I lost the initial information. Can you help figuring out what I am doing wrong? thanks in advance, f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[alternative HTML version deleted]] __ R-help@r-pro

[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 f

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

2012-12-10 Thread Francesco Sarracino
, length.out= 50) data <- data.frame(var, dim1, dim2, dim3) 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. -- F

[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 command

[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

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 wrot

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 > Francesco, > > Try cex.axis=0.6 > > Regards, > > Andrés AM > > 2011/10/12, Francesco Sarracino : > > Dear R-listers, > > > > I have a little problem with a boxplot and

[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] 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 wrote: > Hi Francesco > > > Dear Petr, > > > > thank you so much

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 =

[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 thre

Re: [R] troubles with a for loop

2011-09-18 Thread Francesco Sarracino
eep track of. >> >> The two documents mentioned in my signature >> may help you get up and running in R. Since >> you are coming from Stata, you should also >> look at http://r4stats.com >> >> >> On 18/09/2011 17:05, Francesco Sarracino wrote: >> &g

[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