The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Parameters of confidence ellipse
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

lxtrty

Singapore
1 Posts

Posted - 02/26/2022 :  5:38:52 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi everyone, I'm doing some statistical related work for my final year project and I need to plot 95% confidence ellipses. I was using the 2D Confidence Ellipse app and plotted out an ellipse for my dataset.

However, I need to know the area as part of my work involves comparing the areas of different confidence ellipses.

Is there a way to find out the area of my confidence ellipse? Or at least the lengths of the axes so I can use the A = pi*a*b formula to calculate the area.

Many thanks!!

Lester Tay

easwar

USA
1964 Posts

Posted - 02/27/2022 :  4:23:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Lester,

Thank you for bringing this up. We will improve the App to report the axes lengths of the ellipses soon.

In the mean time, you can use some LabTalk script to compute the axes lengths and the areas.

1> With your graph with the ellipses active, open the script window (menu: Window->Script Window)
2> Copy and paste all lines of script code pasted below, into the Script Window
3> Then press CTRL+A to select all the lines in the script window
4> Press Enter to execute the lines

Hope this helps.

Easwar
OriginLab


// Temp datasets to hold line dx and dy
dataset dsDX, dsDY;

string str2$="MyLine";
icount=0;
// Loop over all graph objects
doc -e G
{ 
  string str1$ = %B;
  // If object is named MyLine...
  if(1 == find(str1$,str2$))
  {
     // Store dx, dy values
     icount++;
     dsDX[icount]=%B.dx;
     dsDY[icount]=%B.dy;

  }
}

// Loop over all dx, dy pairs
for (int ii=1; ii<=icount; ii+=2)
{
    // Calculate major and minor axis length
    double da = sqrt(dsDX[ii]^2+dsDY[ii]^2);
    double db = sqrt(dsDX[ii+1]^2+dsDY[ii+1]^2);
    double darea = pi*da*db;
    type Ellipse#: $((ii+1)/2), a: $(da, .3), b: $(db, .3), area: $(darea, .3);
}

Go to Top of Page

YimingChen

1618 Posts

Posted - 02/28/2022 :  2:17:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Lester,

Just let you know that we updated this app to add the option to show the ellipse parameters (e.g. a, b, area) on the graph. Feel free to try it out. Thank you.
https://www.originlab.com/restricted/support/op/details.aspx?id=45789

James

Edited by - YimingChen on 02/28/2022 2:18:10 PM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000