Statalist The Stata Listserver


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

st: RE: RE: How to convert a MATA matrix into a STATA matrix?


From   "Ulrich Kaiser" <uka@sam.sdu.dk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: How to convert a MATA matrix into a STATA matrix?
Date   Fri, 3 Mar 2006 14:07:33 +0100

Hej Jesper,

hm, I still don't know how that would work. My Mata code is


mata
m_all 	= st_matrix("all")
nom	= m_all[1...,2]
denom	= m_all[1...,3]
denom	= (denom:/denom)-denom 
lr 	= nom :/ denom
out	= m_all[1...,1], lr, m_all[1...,4], m_all[1...,5]
end

and I'd like to turn "out" into data format.

Any ideas?

Uli


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu on behalf of Jesper Kjr Hansen
Sent: Fri 3/3/2006 1:02 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: How to convert a MATA matrix into a STATA matrix?
 
> can anybody tell me how to convert a matrix generated in MATA 
> into STATA format?
> 
> What I am looking for is hence the reverse of st_matrix.
> 
> What I would like to ultimately do is to convert my MATA 
> matrix into data (like "svmat" for STATA matrics).
> 
> 
> Best regards,
> 
> UK
> 

Ulrich,

as far as I can see, you can both obtain and put matrices using st_matrix().




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