search for: sarracino

Displaying 17 results from an estimated 17 matches for "sarracino".

2012 Dec 10
3
equivalent of group command of the egen function in Stata
....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. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[alternative HTML version deleted]]
2012 Dec 21
2
how to recode an ordered factor
...fairly satisfied not at all satisfied not very satisfied very satisfied I believe the new variable is ordered in alphabetical order, but when I tried to use the 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]]
2013 Jan 08
2
how to label two figures in the same chunk independently with knitr
...der to look at the figure on the left. \end{document} How can I do this? If I refer to \ref{fig:example} I will get the number of the figure, but of the chart on the left. Eventually, is it possible to have separate captions for each chart? Thanks in advance for your kind help, f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[alternative HTML version deleted]]
2012 Dec 23
1
Esttab error while exporting regression results
...t. I am using Knitr. Hence I type: eststo(reg1) and esttab() but I get the following error: Error in esttab() : object 'adds' not found I don't understand 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]]
2013 Jan 10
1
help with knit_hooks
...g from lines ... I know that this is my fault because I don't know how to properly use the hooks, therefore I am asking if anybody can advice a reference where I can understand how the hooks and their options work and how to set them. Thanks in advance for your kind help, f. -- Francesco Sarracino, Ph.D. https://sites.google.com/site/fsarracino/ [[alternative HTML version deleted]]
2012 Dec 22
1
how to control the naming of factors in regression
...letters) and preferably I'd prefer to see the original naming of 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/ [[alternative HTML version deleted]]
2011 Oct 12
3
labels in a boxplot
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 var1: var1 <- rnorm(100) and 5 five logical vectors. In this case the vectors don't
2013 Jan 08
1
ggplot not showing all the years on the x-axis
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)) plot <- tmpplot + geom_line() plot In my case, ggplot reports on the year 2000,
2013 Jan 23
1
problems with coercing a factor to be numeric
...)) mean(pp) #this won't work because the argument is not numeric or logical mean(as.integer(pp)) # this computes the average, but not on the range 0-1, but 1-2. 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]]
2011 Sep 18
2
troubles with a for loop
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 output in objects called: pd.memb.0, pd.memb.1, pd.memb.2, pd.memb.3 pd.memb.0 <- lm(E.fs.memb ~
2012 Feb 19
2
barplot with more than 1 variable
Dear R listers, I am trying to produce a simple (for a stata user) barplot with 4 countries on the x axis, each country observed in 2 subsequent years and 3 variables. Basically, I should have three bars for each year for each country. I am attaching the chart I made in Stata, but I am not sure you'll manage to see it! I did the following: #here I create the data-set TUSE2. The vectors mw, st
2012 Dec 20
2
how to make a table of summary statistics
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 found what I am looking for. Probably I am doing something wrong, but I can't figure out
2012 Dec 22
0
texreg error while exporting regression table
...c", model = TRUE) Finally, I wish to include a table with the results in my latex document. Hence I run: tt <- texreg(reg2) but I get the following error: Error in beta[, 1] : incorrect number 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]]
2012 Mar 05
1
problems reading a large dta dataset in R
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: data <-
2012 Mar 01
1
R can't load a large dataset
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 <- read.dta("http://www.stata-press.com/data/kkd/data1.dta", convert.dates = TRUE,
2013 Jan 08
0
Oaxaca-Blinder decomposition in R
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 Oaxaca-Blinder decomposition? Thanks for your kind support, f. [[alternative HTML version
2011 Sep 27
1
regression with ordered arguments
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 three times? fit.1 <- lm(y1 ~ x1) fit.2 <- lm(y2 ~ x2) fit.3 <- lm(y3 ~ x3) Both the y