Announcement

Collapse
No announcement yet.

COP postural sway MatLab

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • COP postural sway MatLab

    Hy

    I was wondering if anyone could share his/her MatLab Code for calculating COP 95% CI ellipse for COP body sway data (XY coordinates)? I was looking intensively for some examples but was not able to find any.

    I really would appreciate your help

    Many thanks,
    Brian

  • #2
    Re: COP postural sway MatLab

    Brian -This reference may be of use to determine the ellipse for COP

    Oliveira LF, Simpson DM, Nadal J. 1996. Calculation of area of stabilometric
    signals using principal component analysis. Physiological Measures17: 305-312.


    adam

    Comment


    • #3
      Re: COP postural sway MatLab

      Hi Brian,

      I am not too sure how you're planning to go about your analysis, or if your heart is set on using confidence ellipses, however there are other approaches you could use. I am always concerned about using confidence ellipses due to their reliance on the CDF and on SD's (especially as you have to use 2.4 SD's to get 95% of the data).

      I have recently started to look at polar smoothing using LOESS weighting; there is a nice section in Exploratory Data Analysis with MATLAB (http://www.amazon.com/Exploratory-An.../dp/1439812209) in chapter 7. The MATLAB code is included, though if you don’t have the curve fitting toolbox you will need to find some code for LOESS. If you need I can post the code for this with a reference from where I got it.

      I have previously found a PDF for the book somewhere online but I can’t seem to track it down now (sorry).

      If you would rather stick to confidence ellipses you can adapt the code from this overview (http://stackoverflow.com/questions/3...data-in-matlab), but I strongly suggest you test the data distribution before analyse with CE's!

      The code above originally calculates the area for 1 SD (= to 40% of data in CE). However the edit you need to amend this is posted in the comments so you amend as required.

      Hope this helps
      Dan

      Comment


      • #4
        Re: COP postural sway MatLab

        Hi Brian,

        You can find a Matlab function to calculate 95% confidence ellipse area for postural data at the following address : http://demotu.org/software2/ellipse.m. (this is a code written by M. Duarte, who published several papers on postural control and postural sway analysis). I've already used it and it works very well.
        You just need to enter your data for COPx and COPy and it will give you the value of the 95% confidence ellipse area (you can also modify the confidence area).

        You can also find some other interesting Matlab functions at this address : http://ebm.ufabc.edu.br/en/?page_id=2086&lang=en.

        Hope this helps !

        Anthony

        Comment


        • #5
          Re: COP postural sway MatLab

          function [area_CE95] = cop_AREA_CE95(COP)
          %================================================= ========================
          % FUNCTION: cop_AREA_CE95
          % Author: Shinichi Amano
          % All procedures are based on Prieto et al. (1996)
          % This function calculate the 95% confidence ellipse of COP data (unit:mm^2).
          %================================================= ========================

          % Initial variables declaration
          f=3; % F score for the large sample size (>120) is 3.00.
          n=max(size(COP));

          COPx=COP(:,1);
          COPy=COP(:,2);

          for jj=1:max(size(COPx))
          temp(jj,1)=COPx(jj,1)*COPy(jj,1);
          end
          covar_xy=(1/n)*sum(temp);
          clear temp;

          %Calculate the area_CE95 (mm^2).
          area_CE95=2*pi*f*sqrt((std(COPx))^2*(std(COPy))^2-covar_xy^2)/100;

          clear jj f n COP COPx COPy covar_xy m_COPx m_COPy;


          Input for this function is COP data (2 columns, AP and ML direction.
          Let me know if there are any typos for this function....I would appreciate it.

          Hope this helps you.


          Originally posted by bhorsak37 View Post
          Hy

          I was wondering if anyone could share his/her MatLab Code for calculating COP 95% CI ellipse for COP body sway data (XY coordinates)? I was looking intensively for some examples but was not able to find any.

          I really would appreciate your help

          Many thanks,
          Brian

          Comment


          • #6
            Re: COP postural sway MatLab

            Dear all,

            many thanks for your helpfull answers - finally I was able to produce same results for the CE Area with the code provided by Anthony and my self written code (Prieto et al., 1996 Measures of Postural Steadiness) - so both codes work well, I guess

            @ Shinichi Amano:thank your for your code - but I was not able to get reliable results with it and could not find, where the problem is (or if there were any typos?)


            Thanks again to all!

            Brian

            Comment


            • #7
              Re: COP postural sway MatLab

              Hi Bryan,

              COuld you send me your Matlab routine for calculating COP 95% CI ellipse for COP body sway data (XY coordinates)? I try to get the code form the webpage but I can't find it.

              Regrads,

              Alberto



              Originally posted by bhorsak37 View Post
              Hy

              I was wondering if anyone could share his/her MatLab Code for calculating COP 95% CI ellipse for COP body sway data (XY coordinates)? I was looking intensively for some examples but was not able to find any.

              I really would appreciate your help

              Many thanks,
              Brian

              Comment


              • #8
                Hi all,

                We proposed new methods (Optimization algorithm and data trimmer) that perform explicitly better than the covariate method proposed by Prieto et al. (1993) and PCA methods proposed by Oliveira et al. (1996). You can check our published work in the Journal of Computers in Biology and Medicine. The title of our work is "Enclosing 95% confidence area and volume to center of pressure and center of mass in posturography using optimization algorithm and coordinate ascent methods."

                We provided the MATLAB functions and standalone applications (.exe) in the links below.

                Matlab link:


                Github link:


                You can use our MATLAB functions or the graphic user interface to enclose ellipses to 95% CoP or CoM data. If you do not have access to MATLAB software, we also provided the standalone (.exe) application. However, we highly recommend using MATLAB since we find that the MATLAB user interface leads to a better result than the standalone application (.exe file).
                We also provide a tutorial video on how to use the functions and graphic user interface.

                I hope this helps all to assess the balance control and balance recovery.

                Best regards,
                Mohsen.​
                Last edited by Mohsen Alighanbari; January 7, 2025, 04:44 PM.

                Comment

                Working...
                X