<div dir="ltr">also, the noise covariance (corresponding to the covariance of "erreur" in your equations) is returned in PE_est.<div><br></div><div>Tim</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Fri, Feb 14, 2014 at 7:08 PM, Tim Mullen <span dir="ltr"><<a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Dear Ibtissem, <div><br></div><div>The SIFT function pop_est_fitMVAR(EEG) will allow you to compute the desired coefficients from the data stored in an EEGLAB dataset. They will be stored in <a href="http://EEG.CAT.MODEL.AR" target="_blank">EEG.CAT.MODEL.AR</a>.</div>


<div><br></div><div>Alternately, you can also check out any of the mvar_* functions which will return the coefficient matrix A = [A1 A2 .. Ap] for any data matrix Y, using different model fitting approaches. </div><div><br>


</div><div>See the short example below (uses the latest version of SIFT from bitbucket: <a href="https://bitbucket.org/tmullen/sift_public_beta" target="_blank">https://bitbucket.org/tmullen/sift_public_beta</a>).</div><div>

<br></div><div>
<pre style="vertical-align:baseline;line-height:16.799999237060547px;font-size:12px;background-color:rgb(247,247,247);margin-bottom:20px;margin-top:0px;outline:rgb(0,0,0);border:1px solid rgb(211,211,211);padding:10px">format <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">short</span>
<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(34,139,34)">% generate 30 seconds of data from a bivariate coupled oscillator model</span>
[data, ~, AR_true] = sim_varmodel(<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'sim'</span>,{<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'Bivariate Coupled Oscillator'</span>},       <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(0,0,255)">...</span>
                                  <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'simParams'</span>,{<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'srate'</span> 100 <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'Nl'</span> 30 <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'Nr'</span> 1},     <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(0,0,255)">...</span>
                                  <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'genParams'</span>,{<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'sigma'</span> 1 <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'mu'</span> [] <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'noiseDistrib'</span> <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(0,0,255)">...</span>
                                              {<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'arg_selection'</span> <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'gengauss'</span> <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'alpha'</span> 1 <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'beta'</span> 2}},<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(0,0,255)">...</span>
                                  <span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'makeEEGset'</span>,[],<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'plotData'</span>,true,<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'plotGraphicalModel'</span>,true);
AR_true = AR_true{1};

fprintf(<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'\nTrue VAR coefficients (A_true = [A1 A2]):\n'</span>);
disp(AR_true);

<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(34,139,34)">% estimate VAR coefficients using ARFIT</span>
ModelOrder = 2;
[AR_est PE_est] = mvar_vieiramorf(data,ModelOrder);

fprintf(<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'\nEstimated VAR coefficients (A_est = [A1 A2]):\n'</span>);
disp(AR_est);

<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(34,139,34)">% compute percent consistency</span>
PC = norm(AR_est(:)-AR_true(:))/norm(AR_true(:));
fprintf(<span style="margin:0px;padding:0px;border:0px;outline:rgb(0,0,0);vertical-align:baseline;background-color:transparent;color:rgb(160,32,240)">'\nPercent consistency: %0.5g%%\n'</span>,(1-PC)*100);
</pre><pre style="margin-top:0px;margin-bottom:20px;padding:10px 11px;border:0px;outline:rgb(0,0,0);font-size:12px;vertical-align:baseline;color:rgb(76,76,76);line-height:16.799999237060547px">True VAR coefficients (A_true = [A1 A2]):
    0.6000         0         0    0.6500
         0    0.5000         0   -0.3000

Estimated VAR coefficients (A_est = [A1 A2]):
    0.5992   -0.0105   -0.0014    0.6466
    0.0047    0.5277    0.0019   -0.3039

Percent consistency: 97.121%
</pre><img src="cid:ii_144337e817f1670b" alt="Inline image 1" width="420" height="262"></div><div><img src="cid:ii_144337eacbd33414" alt="Inline image 2" width="420" height="315"><br><span style="line-height:16.799999237060547px;font-size:12px;font-family:Arial,Helvetica,sans-serif"></span><p style="margin:25px 0px 0px;padding:10px 0px;border-width:1px 0px 0px;border-top-style:dotted;border-top-color:rgb(135,135,135);outline:rgb(0,0,0);font-size:0.8em;vertical-align:baseline;width:auto;line-height:13.4399995803833px;font-style:italic;color:rgb(135,135,135);float:none;font-family:Arial,Helvetica,sans-serif">


<br>Published with MATLAB® 7.14</p></div><div><br></div><div>Best,</div><div>Tim</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Wed, Feb 5, 2014 at 1:08 AM, Ibtissem KHOUAJA BENFRADJ <span dir="ltr"><<a href="mailto:ibtissem.khouaja@live.fr" target="_blank">ibtissem.khouaja@live.fr</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr"><br><span lang="en"><span>Thank you</span> <span>for all your answers</span>.<br></span><br><span lang="en"><span><span lang="en"><span>I dont</span> <span>want</span> <span>to</span> <span>disturb</span> <span>you, </span></span>but</span> <span>one last question</span> <span>please.</span> </span><br>


<span lang="en"><span>How</span> <span>can I</span> <span>calculate the coefficients</span> <span>of the matrix.<br></span> <span>It</span> <span>is very important</span> <span>to pass</span> <span>the things</span> <span>you taught me</span><span>.</span> </span><br>


<br><div><div>   Y1(t)=a1 y(n-1) - a2 y(n-2)+....<u></u>.+erreur</div><br></div><div><div>The goal is to study the time and space variance between electrodes. </div><div><br></div></div><div><div>Thak you in advance for your help</div>


<div><br></div></div>Best regards,<div><div><font style="font-size:10pt" color="#666666" face="Comic Sans MS"><br>--------------------</font><font style="font-size:10pt" color="#666666" face="Comic Sans MS"><br>
Ibtissem KHOUAJA BENFRADJ</font><div><span><font color="#666666" face="Comic Sans MS">PhD in computer science</font></span></div><div><span><font color="#666666" face="Comic Sans MS">Speciality Signal Processing</font></span></div>


<div><span><font color="#666666" face="Comic Sans MS">Laboratory LTIM, University of Monastir, Tunisia</font></span></div><div><a href="http://www.labtim.org/accueil.php" target="_blank"><font color="#666666" face="Comic Sans MS">http://www.labtim.org/accueil.php</font></a></div>


<div><span><font style="font-size:10pt" color="#666666" face="Comic Sans MS">Laboratory LIGM, Univerisity of Paris-East, France </font></span></div><div><a href="http://ligm.u-pem.fr/" target="_blank"><font style="font-size:10pt" color="#666666" face="Comic Sans MS">http://ligm.u-pem.fr/</font></a></div>


<div><span><font color="#666666" face="Comic Sans MS"><br></font></span></div><div><span style="font-size:12pt"><br></span></div><br><br><div><hr><br>

<div dir="ltr"><div><hr>From: <a href="mailto:ibtissem.khouaja@live.fr" target="_blank">ibtissem.khouaja@live.fr</a><br>To: <a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a><br>Date: Tue, 28 Jan 2014 01:10:11 +0100<br>


CC: <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>Subject: Re: [Eeglablist] EEG parameterization<br><br>


<div dir="ltr"><font color="#000000" face="Times New Roman"><br></font>Thank you Tim so much for your answers, <span lang="en"><span>your</span> <span>support</span> <span>keeps me going</span> <span><br>and</span>help me <span>to</span> <span>better understand the needs</span> <span>of my work.</span> <br>


<br><span><br>I extrcted the matrix chains EEG from an (.edf) file, <br></span></span><span lang="en"><span><span lang="en"><span>I want to find</span> <span>the linear equation</span> <span>that characterizes</span> <span>the dynamics of these</span> <span>signals</span> <span>as described</span> <span>in the article:</span><br>


 <span>"A</span> <span>MATLAB</span> <span>toolbox</span> <span>for</span> <span>Granger</span> <span>causal</span> <span>connectivity</span> <span>analysis",<br></span></span></span></span><br>x1(t) = 0.95 √2x1(t − 1) − 0.9025x1(t − 2) + w1(t)<br>


x2(t) = 0.5x1(t − 2) + w2(t)<br>x3(t) = −0.4x1(t − 3) + w3(t)<br>x4(t) = −0.5x1(t − 2) + 0.25√2x4(t − 1) + 0.25√2x5(t − 1)+w4(t)<br>x5(t) = −0.25√2x4(t − 1) + 0.25√2x5(t − 1) +w5(t)<br><br><span lang="en"><span>how</span> <span>these factors</span> <span>can be extracted?<br>


<br>thanks in advance,</span></span><br><br><font style="font-size:10pt" color="#666666" face="Comic Sans MS">Ibtissem KHOUAJA BENFRADJ</font><div><span><font color="#666666" face="Comic Sans MS">PhD in computer science</font></span></div>


<div><span><font color="#666666" face="Comic Sans MS">Speciality Signal Processing</font></span></div><div><span><font color="#666666" face="Comic Sans MS">Laboratory LTIM, University of Monastir, Tunisia</font></span></div>


<div><a href="http://www.labtim.org/accueil.php" target="_blank"><font color="#666666" face="Comic Sans MS">http://www.labtim.org/accueil.php</font></a></div><div><span><font color="#666666" face="Comic Sans MS">Laboratory LIGM, Univerisity of Paris-East, France </font></span></div>


<div><a href="http://ligm.u-pem.fr/" target="_blank"><font color="#666666" face="Comic Sans MS">http://ligm.u-pem.fr/</font></a></div><div><span><font color="#666666" face="Comic Sans MS"><br></font></span></div>
<div><span style="font-size:12pt"><br></span></div><br><div><div dir="ltr"><div><br><div><hr>From: <a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a><br>Date: Wed, 15 Jan 2014 18:26:48 -0800<br>


Subject: Re: [Eeglablist] EEG parameterization<br>To: <a href="mailto:ibtissem.khouaja@live.fr" target="_blank">ibtissem.khouaja@live.fr</a><br>CC: <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>


<br><div dir="ltr">The function (<sift-root>/est/est_fitMVAR_DEKF.m) is included in SIFT 1.0-beta and later, which you can obtain from the EEGLAB plugin manager or the SIFT website.<div><br></div><div>Best,</div><div>


Tim</div>

</div><div><br><br><div>On Wed, Jan 15, 2014 at 5:28 AM, Ibtissem KHOUAJA BENFRADJ <span dir="ltr"><<a href="mailto:ibtissem.khouaja@live.fr" target="_blank">ibtissem.khouaja@live.fr</a>></span> wrote:<br>

<blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr"><font color="#000000" face="Times New Roman"><br></font>Thank you Tim,<br>I actually need the non linear filter to study the EEG signaland to extract these features.<br><br>I find the linear filte (est_fitMVARKalman) on the net but I can't find the socond one (est_fitMVAREKF).<br>




Can you send me the link.<br><br>thanks a lot.<br><font style="font-size:10pt" color="#666666" face="Comic Sans MS">-----------</font><font style="font-size:10pt" color="#666666" face="Comic Sans MS"><br>Ibtissem KHOUAJA BENFRADJ</font><div>




<span><font color="#666666" face="Comic Sans MS">PhD in computer science</font></span></div><div><span><font color="#666666" face="Comic Sans MS">Speciality Signal Processing</font></span></div><div><span><font color="#666666" face="Comic Sans MS">Laboratory LTIM, University of Monastir, Tunisia</font></span></div>




<div><a href="http://www.labtim.org/accueil.php" target="_blank"><font color="#666666" face="Comic Sans MS">http://www.labtim.org/accueil.php</font></a></div><div><span><font color="#666666" face="Comic Sans MS">Laboratory LIGM, Univerisity of Paris-East, France </font></span></div>




<div><a href="http://ligm.u-pem.fr/" target="_blank"><font color="#666666" face="Comic Sans MS">http://ligm.u-pem.fr/</font></a></div><div><span><font color="#666666" face="Comic Sans MS"><br></font></span></div>

<div><span style="font-size:12pt"><br></span></div><br><br><div>> Date: Wed, 8 Jan 2014 18:04:46 -0800<div><br>> Subject: Re: [Eeglablist] EEG parameterization<br></div>> From: <a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a><br>




> To: <a href="mailto:ibtissem.khouaja@live.fr" target="_blank">ibtissem.khouaja@live.fr</a>; <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>> CC: <br><div><div>

> <br>> There are linear and nonlinear kalman filter-based multivariate autoregressive implementations in the Source Information Flow Toolbox for EEGLAB. See est_fitMVARKalman and est_fitMVARDEKF. <br>> <br>> Tim<br>




> <br>> -----Original Message-----<br>> Date: Wednesday, January 08, 2014 1:40:42 pm<br>> To: "EEGLAB-list" <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>




> From: "Ibtissem KHOUAJA BENFRADJ" <<a href="mailto:ibtissem.khouaja@live.fr" target="_blank">ibtissem.khouaja@live.fr</a>><br>> Subject: Re: [Eeglablist] EEG parameterization<br>> <br>> <br>



> <br>
> <br>> <br>> Thank you very much for your answers and happy new year 2014.<br>> On my first question, I am based on your set and literature and I will present the EEG signal from a set of evolutionary parameters based on the Kalman filter.<br>




> This gives the possibility of reconstructing the signal and to predict its evolution.<br>> Is there someone who work with this type of auto-regressive filter?I need the algorithm in Matlab.<br>> Thank a lot for your precious help, Ibtissem<br>




> <br>> <br>> <br>> ---------------------------------------------------------------------------<br>> ---------------------------------------------------------------------------<br>> > From: <a href="mailto:poil.simonshlomo@gmail.com" target="_blank">poil.simonshlomo@gmail.com</a><br>




> > Date: Thu, 19 Dec 2013 21:43:51 +0100<br>> > Subject: Re: [Eeglablist] EEG parameterization<br>> > To: <a href="mailto:ibtissem.khouaja@live.fr" target="_blank">ibtissem.khouaja@live.fr</a><br>> > CC: <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>




> > <br>> > Dear Ibtissem,<br>> > <br>> > There are several ways you can characterize an EEG signal. The two<br>> > basic are frequency and amplitude in different frequency bands (and<br>> > spatial location). You can see more here:<br>




> <br></div></div></div>                                       </div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>---------  αντίληψη -----------
</div></div></div>                                      </div>
<br>_______________________________________________
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a></div>                                         </div>
<br>_______________________________________________
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a></div>                                         </div>
<br>_______________________________________________
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a></div>                                         </div></div></div></div>



</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>---------  αντίληψη -----------
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>---------  αντίληψη -----------
</div>