Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Re: Equivalent to matcell in table


From   Tobias Friedli <[email protected]>
To   [email protected]
Subject   Re: st: Re: Equivalent to matcell in table
Date   Wed, 14 Jul 2010 14:00:22 +0200

This is what i have:

NewModel		Traded_Model	table1
Expedition		2.3CL			1
Montero_Sport	2.3CL			1
200SX			200SX			1
4Runner		200SX			1
626				200SX			2
Accord			200SX			2
Alero			200SX			1
....				...				...

where "table1" are the frequencies

This is what i want:

				2.3 CL		200SX	.....

Expedition		1			1
Mondeo Sport	1
200SX			0			1

......

I tried the following:

reshape wide table1, i(Traded_Model) j(NewModel) string

Then i get the error message Table12.3CL invalid name. Any suggestions where i am wrong?




On 14.07.2010, at 13:27, Maarten buis wrote:

> --- On Wed, 14/7/10, Tobias Friedli wrote:
>> I already have a excel file with all
>> the Solver stuff set up to do some optimization on a log
>> likelihood function derived from the matrix. I would like to
>> do it in Stata, but i am just do not have the skills 
>> to programm it in stata, this is why i use excel for the
>> optimization.
> 
> That worries me. Regardless of its strenghts and weaknesses,
> Excel just is not made to do this kind of stuff. You really 
> really really want to use purpose written software, like Stata, 
> to this kind of maximization of the likelihood, it is just
> too easy to get it wrong.
> 
> If you want to implement your model in Stata (and I repeat,
> I strongly recommend that you do), than you will want to 
> have this book on your desk:
> http://www.stata.com/bookstore/mle.html
> 
> In addition, if you can wait a while, during the next Italian
> Stata Users' meeting there will be a course on programming
> in Stata: <http://www.stata.com/meeting/italy10/>
> 
>> If i use the -outfile-  i get a .txt with some tousend
>> rows and 3 colums. But what i want is to have the matrix (as
>> displayed for -table- , i.e 700 rows and 700 colums). how
>> can i do that?
> 
> You will need to use -reshape- to get your data in the right
> format. 
> 
> Hope this helps,
> Maarten
> 
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
> 
> http://www.maartenbuis.nl
> --------------------------
> 
> 
> 
> 
> *
> *   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/


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index