Dear friends,
I am trying to represent 3D data in 2D. The colours on the plot would be probabilities of TB infection and on the axes, I would have time (t) and ventilation rate (Q), keeping other variables fixed.
Probability = 1 - e^ (-Ipqt/Q) [the Wells Riley equation]
I am wondering about using the contour plot option in twoway, which I think I am comfortable with (there is a nice video on the STATA YouTube channel). I am struggling with setting up the input data.
I think I need a set of input data that look like this...
1, 1
1, 2
1, 3
[...]
1, 10000
2, 1
2, 2
2, 3
[...]
2, 10000
[etc, all the way up to...]
10000, 10000 [10000 hours and 10000 m3/hr]
The third column in the dataset would then be a simple formula derived from the first two columns.
I am not sure how well twoway would handle a 10000 x 10000 grid. I will probably have log scales on my contour plot so, ideally, would have more data points at lower values of t and Q and could afford to have a less dense grid at higher values of t and Q.
I am sure this is very simple but I am struggling!
Thanks,
Tom
Related Posts with Generating input data for a heat plot
matcell option in a table with weightsWhile running table son father[pw=pn], center format(%9.0f) matcell(PQ) I am getting an error messa…
Difference in Difference with propensity score matchingHello Statalist team, may I ask you the following qustion? I would like to use the DID with propens…
How to give different color for all the scatter plots in a graph?Hello everyone, I am using Stata 16.0, The data is in wide format with 29 observations. It is a Nati…
New package: xtbalance2 - Create a balanced subsample from unbalanced panel data.Thanks to Kit Baum, a new package called xtbalance2 is available on SSC. xtbalance2 creates an indi…
How to convert a variable in the format "day, month, year" to another variable in the format "month, year"?Hello, I would like to convert a "date" variable in is in the format "day, month, year" to another …
Subscribe to:
Post Comments (Atom)
0 Response to Generating input data for a heat plot
Post a Comment