Displaying 20 results from an estimated 1000 matches similar to: "Help with write.foreign (exporting data to Stata)"
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
2007 Jul 12
1
Difference in linear regression results for Stata and R
Hi
I recently imported data from r into Stata. I then ran the linear
regression model I've been working on, only to discover that the results are
somewhat (though not dramatically different). the standard errors vary more
between the two programs than do the coefficients themselves. Any
suggestions on what I've done that causes this mismatch?
Thanks,
Kate
--
View this message in
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
2008 Jan 03
1
R procedure similar to STATA heckprob?
Is anyone aware of an R procedure similar to STATA's "heckprob" procedure?
"Heckprob" fits maximum likelihood probit models correcting for sample
selection bias.
Thanks,
Richard Saba
Department of Economics
Auburn University
Email: sabaric@auburn.edu
[[alternative HTML version deleted]]
2005 Aug 03
1
Multilevel logistic regression using lmer vs glmmPQL vs.gllamm in Stata
>On Wed, 3 Aug 2005, Bernd Weiss wrote:
>
>> I am trying to replicate some multilevel models with binary outcomes
>> using R's "lmer" and "glmmPQL" and Stata's gllmm, respectively.
>
>That's not going to happen as they are not using the same criteria.
the glmmPQL and lmer both use the PQL method to do it ,so can we get the same result by
2010 Jan 04
1
glmer (lme4), glmmPQL (MASS) and xtmepoisson (Stata)
Dear R users,
I'm trying to specify a generalized linear mixed model in R, basically a Poisson model to describe monthly series of counts in different regions.
My aim is to fit subject-specific curves, modelling a non-linear trend for each region through random effects for linear splines components (see Durban et al, Stat Med 2005, or " Semiparametric regression" by Ruppert et al,
2005 Aug 03
2
Multilevel logistic regression using lmer vs glmmPQL vs. gllamm in Stata
Dear all,
I am trying to replicate some multilevel models with binary outcomes
using R's "lmer" and "glmmPQL" and Stata's gllmm, respectively.
The data can be found at <http://www.uni-koeln.de/~ahf34/xerop.dta>.
The relevant Stata output can be found at <http://www.uni-
koeln.de/~ahf34/stataoutput.txt>. First, you will find the
unconditional model,
2012 May 03
2
Very small random effect estimation in lmer but not in stata xtmixed
Hi folks
I am using the lmer function (in the lme4 library) to analyse some data where individuals are clustered into sets (using the SetID variable) with a single fixed effect (cc - 0 or 1). The lmer model and output is shown below.
Whilst the fixed effects are consistent with stata (using xtmixed, see below), the std dev of the random effect for SetID is very very small (3.5803e-05)compared to
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
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
2011 Mar 28
1
maximum likelihood accuracy - comparison with Stata
Hi everyone,
I am looking to do some manual maximum likelihood estimation in R. I
have done a lot of work in Stata and so I have been using output
comparisons to get a handle on what is happening.
I estimated a simple linear model in R with lm() and also my own
maximum likelihood program. I then compared the output with Stata.
Two things jumped out at me.
Firstly, in Stata my coefficient
2013 Oct 02
1
foreign package problem with stata 13
foreign package does not support dataset saved at stata 13.
anyone knows any wayt to make it works?
[[alternative HTML version deleted]]
2002 Nov 02
1
R: Use of the Foreign package to import Stata files
Hi,
An R newbie here. I am using R 1.6 currently and have
(successfully, I think) installed the Foreign package.
Tried to import a data file created with Stata 7.0
SE. Had minor problems with syntax then R decided
that my file was not really a Stata file. It rejected
the file saying 'Not created by Stata 5-7/SE'. Any
suggestions on how to convince R that this is really,
truly a Stata
2009 Jul 11
0
foreign generates bad Stata data files (PR#13820)
Full_Name: peter muhlberger
Version: 2.7.1
OS: Ubuntu x86_64 dual core
Submission from: (NULL) (70.238.206.13)
I've spent half a day generating .dta files using write.dta only to have them
crash my copy of Stata. I eventually discovered that removing a string variable
with a maximum observed length of 280 characters allows Stata to read the file
without problems. A Stata limit is that the
2003 Oct 06
1
Re: Use of the Foreign package to import Stata files
Long ago (Sat, 2 Nov 2002), Bill Hart <w.hart at sbcglobal.net> wrote:
> An R newbie here. I am using R 1.6 currently and have
> (successfully, I think) installed the Foreign package.
> Tried to import a data file created with Stata 7.0
> SE. Had minor problems with syntax then R decided
> that my file was not really a Stata file. It rejected
> the file saying
2009 May 01
0
Confusion going from Stata -> R
Dear list,
I am trying to replicate some Stata results but having a tough time doing it in R. The goal is to obtain a difference-in-difference estimate in a model with simple state fixed effects. The "state" variable is a factor, but some levels are missing. It appears that Stata automatically recognizes this and works around it. It also automatically pick "ME" as the base
2004 Apr 28
3
Possible bug in foreign library import of Stata datasets
Concerning this article, Christopher Zorn, "Generalized Estimating
Equation Models for Correlated Data: A Review with Applications." 2001.
American Journal of Political Science 45(April):470-90.
The author very kindly provides data for replication on his web page:
http://www.emory.edu/POLS/zorn/Data/GEE.zip.
I've been comparing the Professor Zorn's results obtained with
2008 Apr 19
3
R question for Stata users
Hi...
In Stata, there is the ability to display scatter plots with data
points at the same (x,y)
location, using the 'jitter' command of the twoway scatter stata
command.
Anyone know of a way that I can do the equivalent thing in R?
For non-Stata readers, if jitter is enabled in stata, and n-points
would be at
the same (x,y) location, the points are offset a bit (according to
2010 Nov 16
1
Offset in glm poisson using R vs Exposure in Stata
R-helpers,
I am hoping to find someone who uses both R and program Stata for GLMs.
I am a beginner R user, finding my own way through; learning code etc. at the same time as learning the statistics I need to complete my project.
What I have is the code from Stata and am trying to reproduce the same analysis in R - my program of choice.
. glm count md ms rf sg, family(poisson)
2009 Jan 21
0
trouble switching to 'plm' from 'xtabond' and Stata
Hello,
I am switching to R from Stata and I am having particular trouble with
the transition from Stata's 'xtabond' and 'ivreg' commands to the
"plm" package. I am trying to replicate some of the dynamic panel data
work using the UK Employment data in Arellano and Bond (1991) and
available as 'EmplUK' under the 'plm' package.
I have been