how to change the arrow values in Stata graph? - graph

I have drawn a gsem plot for my data using Stata software. The graph of coefficient values is displayed on the arrows. But I want the odds ratio values of my variables to be written on the arrows. How can I change this? could you please help me ?
By default, it writes the values of the coefficients on the arrows, but I did not find an option to change it to odds ratio. Thank you in advance.
enter image description here

Related

How can I convert a scatterplot into a hexagonal/honeycomb chart?

I have data in a scatterplot that places colors respective of their lightness (x-axis) and saturation (y-axis):
Here's the data set in a spreadsheet.
I would like to transform this into a hexagonal/honeycomb chart. I did this by hand...finding some "lines" in the data for the edges, and then filling in the middle based on intuition:
I'm not sure if that's the "best" honeycomb representation of the data, but something that looks okay to me.
Does anyone have a suggestion on how I could make this process into an algorithm? I have a feeling there's some math or algorithms that would fit this problem which I am unaware of.
Thanks!

Need Help Creating a specific kind of Isotope Plot in ggplot2

I hope that you are doing well. I am currently trying to replicate a type of isotope plot that's common in my field. Essentially, it's the result of a compound-specific stable isotope analysis.
The x and y axes represent delta values that are plotted against isotopic references from animals (ellipses) to identify animals by their signature. The ellipses represent a 95% CI.
I'm a beginner in R. I've managed to get the scatter plot to work, but I don't understand how to create a CI ellipses with reference data. Would anyone here know how to do this?
enter image description here

Is it possible to edit the numbers displayed on an axis without moving the points that were plotted?

I've come up with a graph (a scatterplot) of the log(1+inf) (inf = number of people infected with a given disease on the y-axis against one of the explanatory variables, in this case, the populational density (pop./kmĀ²; x-axis) on my model. The log transformation was used merely for visualization, because it spreads the distribution of the data and allows for more aesthetically appealing plots. Basically, what I want is both axis to show the value of that same variable before the log transformation. The dots need to be plotted like plot(log(1+inf),log(populational_density), but the number on the axis should refer to plot(inf,populational_density). I've provided a picture of my graph with some manual editing on the y-axis to show you the idea of what I want.
The numbers in red would be the 'inf' values equivalent to log(inf);
Please, bear in mind that those values in red do not correspond to reality.
I understand the whole concept of y = f(x), but i've been asked to provide it. Is this possible? I'm using the ggplot2package for plotting.

R: find the correlation between two images - one picture and one heatmap

There are two images that need to be compared their correlation. One image was taken by a camera (Fig. 1); other image was a heatmap (Fig. 2) produced in R. They were cropped in the same size. Please see attached images.
I would like to know their changes of grey scale within that domain to answer this questions: do they have similar hot spots (i.e., brightness and darkness) within that domain?
Should I normalize these images in the grey scale? Should I convert Fig. 1 to the same heatmap format in Fig. 2 for comparison? Any useful tools in R to compare their gradients? Any suggestions or solutions for this task in R?
Thanks a lot.

R confusion heatmap

I have created my first confusion heatmap using the code I found here.
As I result I got a very nice plot with an "increasing" diagonal showing that the predicted and actual data are closely related.
Now, when I look up other confusion matrices, all of them show a "decreasing" diagonal and I'm wondering whether I should adapt my plot in that way (and if so: how?).
Any ideas on that?
By default, R displays a heatmap with the row names ordered from bottom to top, rather than top to bottom.
Here's how to change the ordering

Resources