similar to: What is the R equivalent of STATA's 'drop' command?

Displaying 20 results from an estimated 6000 matches similar to: "What is the R equivalent of STATA's 'drop' command?"

2009 Apr 20
8
R graph into MS Word: which format to use?
Hello, The journal I am publishing in requires MS Word files. What is my best option for getting a high quality image of a graph done in R into Word? JPEG? Postscript? Thanks. -- View this message in context: http://www.nabble.com/R-graph-into-MS-Word%3A-which-format-to-use--tp23133745p23133745.html Sent from the R help mailing list archive at Nabble.com.
2008 Sep 17
3
Need help creating spatial correlation for MC simulation
I want to create a dataset in R with spatial correlation (i.e. clustering) built in for a linear regression analysis. Any tips on how to do this? Thanks. -- View this message in context: http://www.nabble.com/Need-help-creating-spatial-correlation-for-MC-simulation-tp19542145p19542145.html Sent from the R help mailing list archive at Nabble.com.
2012 Mar 12
2
Replicating Stata's xtreg clustered SEs in R
I'm trying to replicate a time-series cross-sectional analysis (countries over years) with SEs clustered by country. ?The original analysis was done in Stata 10 with: xtreg [DV] [IVs] fe cluster(country). Using plm() in R (cran.r-project.org/web/packages/plm/index.html), I've replicated the coefficients. I sought to estimate country-clustered SEs with vcovHC(), and tried a variety of
2010 Apr 12
1
zerinfl() vs. Stata's zinb
Hello, I am working with zero inflated models for a current project and I am getting wildly different results from R's zeroinfl(y ~ x, dist="negbin") command and Stata's zinb command. Does anyone know why this may be? I find it odd considering that zeroinfl(y ~ x, dist="poisson") gives identical to output to Stata's zip function. Thanks, --david [[alternative
2010 Aug 04
2
does R have a command the same with Stata's loop command: ` '
hey, Rers in Stata therer is a loop command ` ' which could do the following: forvalue i=1/10 { ?gen?x`i'=expression } this will generate variable: x1,x2,,,,,x10. so, does R have a corresponding one to this? And one more very basic question: after I open a file and modify it, such as generate some new variables and change some old ones, how to use the changed dataset in
2005 Aug 01
6
converting stata's by syntax to R
I am struggling with migrating some stata code to R. I have a data frame containing, sometimes, repeat observations (rows) of the same family. I want to keep only one observation per family, selecting that observation according to some other variable. An example data frame is: # construct example data fam <- c(1,2,3,3,4,4,4) wt <- c(1,1,0.6,0.4,0.4,0.4,0.2) keep <- c(1,1,1,0,1,0,0)
2011 Apr 07
1
Panel data - replicating Stata's xtpcse in R
Dear list, I am trying to replicate an econometrics study that was orginally done in Stata. (Blanton and Blanton. 2009. A Sectoral Analysis of Human Rights and FDI: Does Industry Type Matter? International Studies Quarterley 53 (2):469 - 493.) The model I try to replicate is in Stata given as xtpcse total_FDI lag_total ciri human_cap worker_rts polity_4 market income econ_growth log_trade
2012 Sep 27
2
equivalent of Stata "by construct"
I am evaluating a switch from Stata to R. I don't need to extensive Statistical methods, but the main reason I am exploring the switch is the coding flexibility in R (e.g. Stata does not support linear/quadratic programming). I have been going over the R syntax and I had a quick question: In Stata, one has a very useful construction called "by", e.g. by month signal: gen xxx =
2011 Jan 16
1
Equivalent to Stata egen tag
What are the R equivalents to the Stata command egen tag and egen count? egen station_week_tag = tag(station week) Thank you
2010 Sep 12
1
R-equivalent Stata command: poisson or quasipoisson?
Hello R-help, According to a research article that covers the topic I'm analyzing, in Stata, a Poisson pseudo-maximum-likelihood (PPML) estimation can be obtained with the command poisson depvar_ij ln(indepvar1_ij) ln(indepvar2_ij) ... ln(indepvarN_ij), robust I looked up Stata help for the command, to understand syntax and such: www.stata.com/help.cgi?poisson Which simply says
2013 Feb 18
3
foreach loop, stata equivalent
Hi! I'm a recent convert from Stata, so forgive my ignorance. In Stata, I can write foreach loops (example below) foreach var of varlist p1-p14 { foreach y of varlist p15-p269 { reg `var' `y' } } It's looping p1-p15, p1-p16...., p1-p269, p2-p15, p2-p16,... p2-p269,... variable pairs. How can I write something similar in R? I 'tried' understanding the
2012 Sep 21
1
Exactly Replicating Stata's Survey Data Confidence Intervals in R
Hi everyone, apologies if the answer to this is in an obvious place. I've been searching for about a day and haven't found anything.. I'm trying to replicate Stata's confidence intervals in R with the survey package, and the numbers are very very close but not exact. My ultimate goal is to replicate Berkeley's SDA website with R (http://sda.berkeley.edu/), which seems to
2012 Dec 10
3
equivalent of group command of the egen function in Stata
Dear R listers, I am trying to create a new variable that uniquely identifies groups of observations in a dataset. So far I couldn't figure out how to do this in R. In Stata I would simply type: egen newvar = group(dim1, dim2, dim3) Please, find below a quick example to show what I am dealing with: I have a dataset with 4 variables: var <- runif(50) ## a variable that I want to group
2006 Nov 04
2
Equivalent to Stata command
Hi: Do any of you know if there's an equivalent function to the Stata command: Use v1 v3 v5 v2 v7 using file.dat In R? (i.e. something that just selectively loads certain variables from a file and not others)? Thanks Jon Minton [[alternative HTML version deleted]]
2009 Dec 01
1
areg (stata) equivalent in R?
hi, i am looking to reproduce a study done in stata in R, where a regression was done while absorbing a categorical variable.? i am new to R, i've i installed the design package but haven't been able to find an applicable function. thanks for any help.
2010 Jun 09
1
equivalent of stata command in R
Dear all, I need to use R for one estimation, and i have readily available stata command, but i need also the R version of the same command. the estimation in stata is as following: 1. Compute mean values of relevant variables . sum inno lnE lnM Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------
2010 Jun 09
1
equivalent of stata command in R‏
From: saint-filth@hotmail.com To: saint-filth@hotmail.com Subject: RE: Date: Wed, 9 Jun 2010 09:53:20 +0000 OK! sorry thats my fault, here the translations of the stata commands 1st step is to get the mean values of the variables, well that doesnt need explanation i guess, 2nd step is to estimate the model on panel data estimation method which is:
2014 Jan 23
2
Stata support in package foreign
As you know, Stata support in 'foreign' was frozen a while back at Stata version 12. R-core has received a request from a grad student to 'give top priority' to supporting Stata 13. That is not going to happen, not least because none of us has access to Stata. However, according to Stata's documentation both Stata 12 and 13 use format 115, so foreign::read.dta should be
2006 Jun 23
2
Tetrachoric correlation in R vs. stata
I hope someone here knows the answer to this since it will save me from delving deep into documentation. Based on 22 pairs of vectors, I have noticed that tetrachoric correlation coefficients in stata are almost uniformly higher than those in R, sometimes dramatically so (TCC=.61 in stata, .51 in R; .51 in stata, .39 in R). Stata's estimate is higher than R's in 20 out of 22
2012 Feb 29
1
equivalent from gladder and ladder from stata
Dear community, Apologies, I'm still pretty newbie. Anyway, I am performing linar regression analysis. As a common cause of non-normally distributed residuals is non-normally predictor variables, i'm interested in achieving the best transformation of the predictors. I've seen some commands at R, but I would like to know if it exists a command equivalent to gladder (graphic display)