Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help to quickly make diagrams in STATA

    Hello STATALIST forum, I am new here and really need some help. The first image shows the data set I am working with. I wanted to create vioplots for each of the variables against the expression data for the gene signatures (seen on the far left of the data set) I also wanted to do ANOVAs for each of them. Below I have shown one example for both the vioplots and the ANOVAs. However, it is extremely cumbersome and manual to do them one by one and was wondering if there was a way to rapidly do this. I have been doing some digging through the forum and online, however, nothing seems to work, closest I have come is (https://www.techtips.surveydesign.co...0off%20command.). Any help would be really appreciated!!! Thank you in advance
    Click image for larger version

Name:	Screenshot 2022-05-22 at 20.40.49.png
Views:	1
Size:	288.1 KB
ID:	1665832
    Click image for larger version

Name:	image.png
Views:	1
Size:	533.0 KB
ID:	1665834
    Attached Files

  • #2
    See the answer(s) to your next thread.

    Comment


    • #3
      Nick Cox I did and it returns the following:

      . foreach var in Subclass Group Level {
      2. vioplot ATF4Targetgenes `var'
      3. graph export ATF4Targetgenes_`var'.png
      4. }
      (file ATF4Targetgenes_Subclass.png written in PNG format)
      type mismatch
      r(109);


      While producing, which is not even comparing the right variables. I am not sure why
      Click image for larger version

Name:	ATF4TargetgenesSubclass.png
Views:	1
Size:	101.2 KB
ID:	1665839

      Comment


      • #4
        Tell us more about Group

        Code:
        d Group 
        
        su Group

        Comment


        • #5
          I figured it out thank you, I was not using the vioplot function correctly

          Comment

          Working...
          X