Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72855

Creating temporary variables (tempvar) with svmat

$
0
0
Dear Statalist,

I am creating a simple program to graph some results of the margins command in combination with other graphs. For this I need to transform matrixes into variables, and I rely on the svmat command to do so. However I would like svmat to generate temporary variables (tempvar) so that they are not stored in the dataset once the program has been executed. I have tried to generate temporary variables with svmat without success. Is there any way to do it or should I use a different procedure to transform matrixes into variables? Here you have the relevant part of my original code in which svmat generates 10 regular variables from matrix C:

Code:
matrix A = r(at) 
matrix B = r(table)'
local maxat = `points' + 1 
matrix D = A[1..`maxat', "`varlist'"]
matrix C = B, D
svmat C, names(c)

And here you can find the code I used to generate temporary variables without success:

Code:
matrix A = r(at) 
matrix B = r(table)'
local maxat = `points' + 1 
matrix D = A[1..`maxat', "`varlist'"]
matrix C = B, D
tempvar c1 c2 c3 c4 c5 c6 c7 c8 c9 c10
svmat C, names(`c')
Thank you.

Enrique

Viewing all articles
Browse latest Browse all 72855

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>