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]

Re: st: putmata and getmata


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: putmata and getmata
Date   Fri, 3 Aug 2012 10:28:19 -0500

Mata can indeed have many matrices in memory at once; what's more,
they can be of quite different sizes, shapes and contents.

Nick

On Fri, Aug 3, 2012 at 9:38 AM, tashi lama <ltashi32@hotmail.com> wrote:
> Yes.. I was running putmata in mata window when I should have run in stata mode. Please correct me if I am wrong. From what I understand, putmata is similar to st_data but with more options. Also, is it true that mata could have several matrices in the memory simultaneously unlike stata where only one dataset could be open at one time.

From: scott.merryman@gmail.com

>> Are you trying to use -putmata- while in -mata-?
>>
>> Iit seems to fine for me:
>>
>> . clear*
>>
>> . sysuse auto
>> (1978 Automobile Data)
>>
>> . putmata *
>> (12 vectors posted)
>>
>> . mata: mata desc
>>
>> # bytes type name and extent
>> -------------------------------------------------------------------------------
>> 592 real colvector displacement[74]
>> 592 real colvector foreign[74]
>> 592 real colvector gear_ratio[74]
>> 592 real colvector headroom[74]
>> 592 real colvector length[74]
>> 1,463 string colvector make[74]
>> 592 real colvector mpg[74]
>> 592 real colvector price[74]
>> 592 real colvector rep78[74]
>> 592 real colvector trunk[74]
>> 592 real colvector turn[74]
>> 592 real colvector weight[74]
>> -------------------------------------------------------------------------------
>>
>>
>> Scott
>>
>>
>> On Thu, Aug 2, 2012 at 3:21 PM, tashi lama <ltashi32@hotmail.com> wrote:
>> >
>> > Hello all,
>> > I am experimenting with mata in an interactive mode. Could someone briefly touch on the following things?
>> >
>> > 1. I have an autodata in my stata memory. When I write
>> >
>> > :putmata * =>invalid expression when clearly the documentation says creates a vector for all the variables in the memory.
>> >
>> > 2. It appears mata can only load either a numeric variable with st_data function or a string variable with st_sdata at one time. Which means it really bars you from getting a full picture of a dataset.

*
*   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