Hello statalisters,
I would like to associate the mean and sd of a variable within one string macro.
I proceed like this :
quietly summarize age
local mu=round(r(mean),0.1)
local sd=round (r(sd),0.1)
Then I would like to convert these mu sd -> string in order to do :
local mu=string(mu) // Doesn't work
local sd=string(sd) // Doesn't work
local p1 "("
local p2 ")"
local musd `sd' `p1' `age' `p2'
disp "`musd'"
. 34(10) // What I want but doesn't work
Then I would like to store `musd' in a cell of a matrix (It doesn't seem to work).
Please help
I would like to associate the mean and sd of a variable within one string macro.
I proceed like this :
quietly summarize age
local mu=round(r(mean),0.1)
local sd=round (r(sd),0.1)
Then I would like to convert these mu sd -> string in order to do :
local mu=string(mu) // Doesn't work
local sd=string(sd) // Doesn't work
local p1 "("
local p2 ")"
local musd `sd' `p1' `age' `p2'
disp "`musd'"
. 34(10) // What I want but doesn't work
Then I would like to store `musd' in a cell of a matrix (It doesn't seem to work).
Please help
Comment