Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Question on Logit/Probit


From   "Jeremy Miles" <jeremy.miles@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Question on Logit/Probit
Date   Sun, 25 Mar 2007 21:45:06 -0700

I think you want to use a beta regression.  I don't know if it exists
(I've never tried to find it in Stata).  It's similar to the
logit/probit approach, in that it transforms the data, and then
estimates the parameters using ML.

There was a paper by Smithson in Psychological Methods on this
recently - the abstract is here:
http://content.apa.org/journals/met/11/1/54

Jeremy



On 25/03/07, David Cobey <dcobey@gmail.com> wrote:
I'm trying to estimate the percentage of an area under high yield variety
crops as time changes. I hoping to estimate a basic S shaped technology
diffusion model.  Can I use logit and probit for a continuous dependant
variable ranging from 0-1 or does logit/probit only work for discrete
variables?
If logit and probit won't work, how should I estimate this S shaped model?

Example of data -

Year    Percentage
1965        0
1966      .1
1967      .3
1968      .6
1969      .8
1970      .9
1971      1

Thanks!
David

-----Original Message-----
From: David Cobey [mailto:dcobey@gmail.com]
Sent: Saturday, March 24, 2007 6:15 PM
To: 'statalist@hsphsun2.harvard.edu'
Subject: RE: Data management

Other people may have better ideas but here is what I would do.

I would create a temporary variable for each id to hold the changes and then
copy them over all at once.

Ex:

egen id= group(code)
gen temporary_id = .

replace temporary_id=3 if id==1;
replace temporary_id=5 if id==2;
replace temporary_id=8 if id==3;

then:

id = temporary_id
drop temporary_id

Hope this helps,
David

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Roy,Suryadipta
Sent: Saturday, March 24, 2007 5:59 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: Data management

Hi,

I have a panel data of (say) 100 countries for 10 years. I
am trying to attach identification numbers for these
countries based on another dataset for merging purposes
later on. So, I started with

a. egen id= group(code), where "code" is the code numbers
of these countries, e.g. ABW, AFG etc.

b. Then I am trying to replace these id-s with
replace id=3 if id==1;
replace id=5 if id==2;
replace id=8 if id==3;

But the 3rd line of the command is replacing the first set
of id-s also. I would greatly appreciate if someone can
suggest how to take care of this.

Thanks,
Suryadipta.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


--
Jeremy Miles
Learning statistics blog: www.jeremymiles.co.uk/learningstats
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index