Hello community!
I am having troubles understanding the formatting of numbers, or more likely understanding the syntax.
I am trying to format some locally saved variables (that's fine so far) and then to output these in a text string.
Here's what I played around with. The lines in italics behind each ">" show what Stata output I receive.
local ProbF = 1.5497823654
local ProbF %9.3f `ProbF'
local F_stat = 5.6973237484
local F_stat %9.3f `F_stat'
di `ProbF' `F_stat'
> 1.550 5.697
di "Prob F > P = " `ProbF '" & F-statistic = " `F_stat'
> Prob F > P = 5497823654" invalid name
local output "Prob F > P = " %9.3f `ProbF' "& F-statistic = "%9.3f `F_stat'
di "`output' "
> invalid syntax
Can someone please tell me how I achieve the following desired output?
"Prob F > P = 1.549 & F-statistic = 5.697"
Related Posts with Formatting numbers saved in a local and using these in a text output
Exporting data from multiple univariate regressions into one big table in excelHi all, I have used a foreach loop to do univariate logistical regression of multiple variables wit…
why I can import complete data?Hello teachers please see the picture, why can't I import complete data? The "import first row as va…
Exporting data from multiple univariate regressions into one big table in excelHi all, I have used a foreach loop to do univariate logistical regression of multiple variables wit…
how to use the stata "bar" to graph a picture like thishow to use the following data to graph a picture like this clear input double 系数 str15 行业 .363 "农业采矿…
Exporting data from multiple univariate regressions into one big table in excelHi all, I have used a foreach loop to do univariate logistical regression of multiple variables wit…
Subscribe to:
Post Comments (Atom)
0 Response to Formatting numbers saved in a local and using these in a text output
Post a Comment