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
Help on storing estimates from multiple regressions run in loop for exporting them with esttabHello there, I have the following quarterly data. I intend to run a piecewise linear regression of …
Reshaping data for conditional logit modelingDear Statalist, I would like to use a conditional logit model to analyze the following survey questi…
ivreg2 and interactions of the endogenous regressorHi have a question about ivreg2. It has been asked before and I have gone through the helpful posts.…
Difference between instrumental variable interaction and instrumental variable subgroup analysisDear Statalist, For the following model under the IV framework: Code: ivreg2 cognition (infl_pneum…
Does _parse comma have a bug with identifying unbound commas in compound quotes?I was surprised to discover that -graph- throws an error when the title (or various other strings) h…
Subscribe to:
Post Comments (Atom)
0 Response to Divide skalar/locals and input result into matrix
Post a Comment