Hello.
I'm trying to make mata function in my loop procedure, and I wonder how to bring matrix to mata function.
If I have A1, A2, A3, A4 matrix in stata space, and then I would like to make some calculation using those matrix through mata function.
forvalues i=1/4 {
mata
function ss {
kmat`i'=st_matrix("A"`i')
}
end.
I would like to know how to convert A1-A4 matrix into mata.
I'm trying to make mata function in my loop procedure, and I wonder how to bring matrix to mata function.
If I have A1, A2, A3, A4 matrix in stata space, and then I would like to make some calculation using those matrix through mata function.
forvalues i=1/4 {
mata
function ss {
kmat`i'=st_matrix("A"`i')
}
end.
I would like to know how to convert A1-A4 matrix into mata.
Comment