Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: saving estimated parameters with -parmby-


From   Schöler, Lisa <lschoeler@wiwi.uni-frankfurt.de>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: saving estimated parameters with -parmby-
Date   Thu, 2 Feb 2012 16:37:35 +0000

Dear Statalist,

I have a dataset with many firms and many observations of a firm. Now I need to run a nonlinear least-squares estimation.

After running the nonlinear least-squares estimation, I would like to save the estimated parameters. So I found suggestions for parmest, in my case parmby because I have different group_ids.

But what I need is that Stata saves each estimate (i.e., b0-b3) in a row, for example

group_id	adopters 	var2 	 ...		t	b0	b1	b2	b3
1		500		.	.		1	0.3	5	88	1	
1		501					2	0.3	5	88	1	
1		502					3	0.3	5	88	1	
1		503					4	0.3	5	88	1	
1		504					5	0.3	5	88	1	
1		505					6	0.3	5	88	1	
2		100					1	5	4	0.2	0.8	
2		106					2	5	4	0.2	0.8	
2		108					3	5	4	0.2	0.8	
3		250					1	1	0.5	0.8	5	
3		297					2	1	0.5	0.8	5	
3		300					3	1	0.5	0.8	5


This is the command I use (Stata 11)

. parmby "nl (adopters= {b0}/(1+exp({-b1}-{b2}*t))+{b3}*t^2)",by(group_id) saving(nl_coefficients,replace)

This works but the estimated parameters are saved like this

group_id	parmseq	estimate
1		b0		238421.79
1		-b1		730.78458
1		b2		21.785424
1		b3		3.0373359
2		b0		8437.5189
2		-b1		41.075473
2		b2		6.0825979
2		b3		-.24629756 

Is there an option that I am missing?

Thank you
Lisa

Lisa Schöler
Professur für BWL, insb. Electronic Commerce
Goethe-Universität Frankfurt
Grüneburgplatz 1 
60629 Frankfurt a.M.
 
Phone: ++49 69 798 34632
Fax:   ++49 69 798 35001
Email: lschoeler@wiwi.uni-frankfurt.de
URL:   www.ecommerce.wiwi.uni-frankfurt.de

_________________________________
Get serious about better marketing decisions - apply now!
http://www.goethe-master.de



Lisa Schöler
Professur für BWL, insb. Electronic Commerce
Goethe-Universität Frankfurt
Grüneburgplatz 1 
60629 Frankfurt a.M.
 
Phone: ++49 69 798 34632
Fax:   ++49 69 798 35001
Email: lschoeler@wiwi.uni-frankfurt.de
URL:   www.ecommerce.wiwi.uni-frankfurt.de

_________________________________
Get serious about better marketing decisions - apply now!
http://www.goethe-master.de



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index