Dear all,
I need to devide one scalar/local through another and input the result into a matrix.
In the following, you find a simplified version of the syntax, which i use:
mata: st_numscalar("sum", z)
count
local a = r(N)
scalar define b = `sum'/`a' // (1) here scalar/local one ist divided through another
matrix define B = (.,.\.,.)
matrix B[1,1] = `b' // (2) here the result is entered into a matrix
Unfortuantely, neither step (1) nor (2) works. Can somebody help me to definie a version of the syntax, which works?
Related Posts with Divide skalar/locals and input result into matrix
Rdplot confidence interval not showingHi all, I have the following code: rdplot aux1hm aux1dm if agech >= `agelow' & agech <= `…
interpolate between two year dates using expandHi all, For my panel data, I want to linearly interpolate between two years. I have data for the pe…
Twoway Line Chart for Regression Dummy CoefficientsDear all, Suppose I have a large dataset that comprises the age and income of Individuals. Now assu…
Random sample panel datahello guys! My data consist of unbalanced Panel data with the identifier gvkey_num fyear, fyear con…
Generating Variable Based on Multiple ConditionsHi all, I am currently working on a stata dataset in regards to institutional holdings. I would lik…
Subscribe to:
Post Comments (Atom)
0 Response to Divide skalar/locals and input result into matrix
Post a Comment