Solving yule-walker equations

Hello
I want to estimate the parameters of an AutoRegressive model order p=5, and from netsearches I understand this entails
1) estimating the autocorrelationfunction up to and including lag 5
2) creating a correlationmatrix R from these, where r_ij = r_ji
3) solving the system R dot a = b
where a is unknown coefficients (the parameters), and b is r_1 - r_p.
I have substracted the mean from my series.
I compare my results from that of R (similar to Splus).
My estimations are perfect for the correlations, but my solution to the system is not. I use the method "gssitisol" from "A numerical library in Java for scientists and engineers", which supposedly should solve these kind of linear systems.
Is my System equation correct? Any other ideas on how to solve this?
Regards
JT

There is not to much to go on. I don't know what this "gssitisol" method is, and I also don't know if you wrote an implementation of it yourself from pseudo code or not...
But from my (very) limited knowledge of AR modelling (a topic in a class of 3 moths) I read that the Yule-Walker method can lead to poor estimates. The Burg�s method is preferred (at least in this article):
http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/publications/Annals.pdf
But I'm still a novice around here. I'm sure that if you're a bit more specific, and perhaps supply some code, there will surely be someone with far more math-skills here who can help you out.
Hope it helped.
Good luck.

Similar Messages

  • Solving the Complex Equations

    Any one help  me how to Solve the complex equation like this.. I was little confused bcoz imaginary part (j) is available..All  variables are known except j...
    Thanks & regards
    Rigil

    When you say "solve" do you mean, evaluate numerically or are you looking for an analytic solution?
    The numerical solution should be a straightforward translation of the equation to LV functions.  LV has  a complex data type which (a + ib) and most mathematical functions will accept it.
    LV is not really set up to do analytical solutions.
    Lynn

  • Power spectrum using yule walker method

    i am currently working on an algorithm and i need to add a power spectrum using yule walker method or modified covariance method or any other power spectrum estimation method except music and fft (periodogram) that i already did. can anybody help me?or does anybody have any other vi that calculates the power spectrum?

    Hi hampis,
    I posed a similar response on the yule walker forum.
    If you're running LabVIEW 8.0 or 8.2 you can use the MathScript node to execute the aryule() function, which uses the Yule-Walker method to estimate autoregressive (AR) model parameters.
    Here is more information on this command:
    aryule (MathScript Function)
    Michael K. | Applications Engineer | National Instruments
    | Michael K | Project Manager | LabVIEW R&D | National Instruments |

  • How to solve a complicated Equation in Numbers?

    I have to calculate the solutions of a complicated equation in Numbers. I have tried to find functions that finds the zeros of a expression, or thought of setting up while loops that runs until the error term is almost 0, but I cannot find any such thing. Can anyone help me figure out how I can set this up in Numbers? This is something that can easily be done with a graphing calculator such as TI-83, but I have many inputs that can vary in my spreadsheet.
    Thanks.

    There is no such a feature in Numbers.
    _Go to "Provide Numbers Feedback" in the "Numbers" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'10
    Yvan KOENIG (from FRANCE dimanche 1 mars 2009 16:10:52)

  • Solving a complicated equation

    Hi, I have a problem. The equations goes like this,
    Yn=TAN(x*T/2)-S/(x*D) where T, D, and S are user inputs. and n indicate nth root.
    Then, 
    delta = an equation that involves the summation of Yn
    For now, I can make the user to input the Value of S to get delta. However, I need to make the program able to calculate S when the user know the value of delta. Do anyone any suggestion?
    Thank you in advance

    An equation that fits on a single line is not complicated.
    Are the values real or complex?
    If you have a VI that calculates delta(S), and the function is well behaved, you could use Newton-Raphson to calculate S(delta).
    LabVIEW Champion . Do more with less code and in less time .

  • Solving a "simple" equation

    Hello all,
    Am trying to get multiple email address from a repeating table and I read from a blog
    here on an equation to do so but I can not seem to get to work. Was wondering if anybody knew what I am doing wrong? Here is my equation:
    eval(eval(Person,' concat(AccountId,"|")'),"..")

    An equation that fits on a single line is not complicated.
    Are the values real or complex?
    If you have a VI that calculates delta(S), and the function is well behaved, you could use Newton-Raphson to calculate S(delta).
    LabVIEW Champion . Do more with less code and in less time .

  • SOLVED: lyx numbering equations by section

    i can not get numbering my equations by sections to work.  i added this
    \numberwithin{equation}{section}
    to the Document->Settings-> Latex preamble.  when i try to view the documents using dvi i get the following message
    Undefined control sequence.
    Latex Error: Missing \begin{document}
    here is a copy of my /home/user_name_here/.lyx/templates/defaults.lyx
    #LyX 1.5.2 created this file. For more info see http://www.lyx.org/
    \lyxformat 276
    \begin_document
    \begin_header
    \textclass article
    \begin_preamble
    \numberwithin{equation}{section}
    \end_preamble
    \language english
    \inputencoding auto
    \font_roman default
    \font_sans default
    \font_typewriter default
    \font_default_family sfdefault
    \font_sc false
    \font_osf false
    \font_sf_scale 100
    \font_tt_scale 100
    \graphics default
    \paperfontsize default
    \spacing single
    \papersize a4paper
    \use_geometry false
    \use_amsmath 1
    \use_esint 1
    \cite_engine basic
    \use_bibtopic false
    \paperorientation portrait
    \secnumdepth 3
    \tocdepth 3
    \paragraph_separation indent
    \defskip medskip
    \quotes_language english
    \papercolumns 1
    \papersides 1
    \paperpagestyle default
    \tracking_changes false
    \output_changes false
    \author ""
    \author ""
    \end_header
    \begin_body
    \begin_layout Standard
    \end_layout
    \end_body
    \end_document
    any ideas?
    EDIT: found the answer to my question i needed to change Document->Settings->Math options
    from "Use AMS math package automatically"  change that to "Use AMS math package"
    Last edited by delacruz (2008-07-04 00:26:50)

    My commands are kind of kludgy (they make the indenting a little weird), but I think they should work
    First, we redefine the command used for numbering sections to "hspace*{-18pt} (ie: just display the title 18pts left of where it should  be). This may need to be adjusted depending on font size/ etc.
    Next, we redefine the command used for numbering subsections to display the subsection number as an arabic numeral.
    \renewcommand{\thesection}{\hspace*{-18pt}}
    \renewcommand{thesubsection}{\indent\arabic{subsection}}
    Just for reference, I believe the default behaviour is
    \renewcommand{\thesection}{\arabic{section}}
    \renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}
    EDIT:
    These commands should be placed in the preamble, although I think they work in document.
    Also,
    \renewcommand{\thesection}{\hspace*{-1.0em}}
    \renewcommand{thesubsection}{\indent\arabic{subsection}}
    may work better, depending on the font/ fontsize you use. (1.0em is roughly the width of an 'M' in the current font.)
    Last edited by leocp1 (2012-01-16 17:55:30)

  • Can I solve 3 nonlinear equations in LabWindows/CVI

    I have 3 nonliear equations with 3 unknowns (x^2, y^2, and z^2) and get the roots?

    There is no CVI function for finding nonlinear roots, but you can use any other C routine, e.g. the ones provided in the GNU Scientific Library 

  • Solving Riccati equation

    I have experience with Systembuild only.
    I saw that Xmath has a module with a function to solve the Riccati equation. How can I use this function in Systembuild?

    The Riccati equation can be solved in SystemBuild using a UserCodeBlock where internally the function XmathExecute is called to solve the Riccatti equation using Xmath.
    This Riccati equation solver could be placed in a slower periodic SuperBlock so that it is not recalculated every time step.
    Another UserCodeBlock (file scoped with the Ricatti solver UserCodeBlock) could return the new A and B matricies.
    But, the real problem is how to inject the new A and B matrix into your model.
    The SystemBuild StateSpace block A,B,C and D matricies can be only changed during simulation initialization.
    You would have to create your own StateSpace SuperBlock using the matrix multiple blocks, UserCodeBlock(returns new A,B), intergator block and summer blocks to calculate.
    Xdot = Ax + Bu;
    Y      = Cx + Du;
    It would be much easier if there were a StateSpace block that had the A and B matricies as inputs.
    Note: using SystemBuild the UserCodeBlocks and StateSpace SuperBlock dimensions are fixed and would have to be determined before hand.

  • HP Prime issue on solving C=S/M equation

    Hi,
    I am trying to solve a simple equation C=S/M in the solver app.
    If I start from scratch I do get results with small numbers for S & M. However, when I use large figures (1,900,000/2,000,000), I receive a "Bad Guess(es)" error. The strangest thing is that if I use the emulator in my PC, I always get the right result without any issues. I have tried using other variables, clearing them all together and it always comes back to the same issue. I have also tried with Solver variables and user variables and it has no benefit
    It looks like the variables are not updated when I enter new values in the Numeric view of the Solver app. But that is too large an issue to really be it.
    Thanks in advance for any support.
    Carlos

    Never mind... I found the solution, however odd it is.
    I was trying to solve the easy equation C=S/R and occasionally obtain the Bad Guess(es) error when the numbers were large (C=1,900,000/2,000,000) for example. Once this happened, the solver would not even work with lower magnitude numbers.
    I noticed that it appeared that the variables in the equation were not updated when I keyed in the numbers in the Numeric view of the Solver app.
    If I performed the same solving process with the emulator in my PC, I had no issues whatsoever, regardless of the magnitude of the numbers.
    Then after reading that the latest firmware update provided the Digit Grouping option, I sort of imagined something could be wrong with it when large numbers were keyed in. Anyway, the emulator does not have this option set in the software and it worked, so it sort of led the way.
    I finally went to settings and selected a Digit Grouping option with no thousands separator and voila... it worked smoothly.
    I think it may be something related to how the numbers are displayed vs how they are stored in the variables that led to this issue.
    Hopefully if someone gets to this same issue, she/he would get some info about it. I also posted this in the Google group in case someone in the HP team may see it and directed so that in a future firmware it is solved.
    Regards,
    Carlos

  • Differenti​al Equation Solving Help

    I am trying to solve the diff equation
    x'' + ax' + bx = c
    The ODE Linear nth Order Numeric function can handle the second derivative but not the c part, correct?
    The euler and assorted solvers can't handle the second derivative nor the constant, correct?
    Do I have any other options?
    thanks.

    It has been a really long time since I have fired my DiffEq neurons. Plus all of my text books are at home.
    I looked a the labVIEW shipping examples. (Open LabVIEW >> help >> file examples >> click on search tab and enter ODE.) Shooting method.vi seems to solve second order equations with a constant. I could be wrong. You may want to look at this one and the other examples for inspiration.

  • Solving nonlinear equation with VI

    Hi,
    I want to use LabView to solve a nonlinear equation. I read forums and figured out that I can use Nonlinear System Solver. vi and I noticed there are two options to write the equation: 1) F(X) is formula and 2) F(X) is VI. I could use the first option and write the equation with that but I did not understand how to use a sub-Vi to provide the equation. Would any one please tell me how to do that?
    Thank you 

    Soran,
    Read the detailed help for the solver VI. 
    The VI usually executes much faster than the formula parser/evaluator. Since solvers (and curve fitters, which have the same options) may need to evaluate the function many times while solving, that time can become significant.
    In the help is a link to a template for the VI you need. You must use the exact connector pane and reference type. While you can create your own VI, it is much easier to use the template. On the block diagram create the code to generate your equation values in the configuration required by the solver. Be careful to put the parameters in the correcto order.
    Lynn

  • Solve Linear Equations NaN return

    I've implemented a modified Linear Levenberg Marquardt function for gauss fitting of spectral data, but have problems from time to time where I simply can't fit a specific data set.
    I've traced the problem to the function "Solve Linear Equations" outputting NaN for one or more solution vectors (Not all) which then plays havok with my function.
    I've located a data set which is initially OK, but which after solving the linear equations has NaN as the second element of the solution vector array. Changing the matrix type to something other than "generic" gets rid of the NaN for this particular data set, but gives problems with others which work with the "generic" matrix type.
    Since my mathematics lectures in college are a few years away now, I'm asking someone out there if they can help me with my problem. I can supply a "corrupting" data set if this would help, or maybe someone knows this problem and has a work-around?
    I've thought of leaving the matrix type to "generic" and checking the output to see if there's a NaN present, and if so, then re-calculate with another matrix type until there's no NaN. This is most likely not very sound mathematically, but it might reduce the number of rogue data sets.
    Thanks in advance
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

    Hi Altenbach,
    The data can have a significant amount of overlap. Typically three to four groups of peaks fully resolved, but each group can have up to 4-5 peaks in them, partially visible only as shoulders.
    The start value "problem" is more or less solved (but as usual, not yet finished).
    I've got an approximate first-guess peak find running which does a pretty good job of finding the peaks I need, and I then fit the height and FWHM first before doing a full optimisation (The Sub-VI approach allows much more flexible fitting models).
    The fitting works well on almost all data sets. There are simply some spectra which (although visibly hardly different to others which work perfectly) do not fit, i.e. generate the NaN response from the "solve linear equations" function. It's a numeric problem (bug?), I'm sure, and not strictly a peak location or resolution problem. then again, I may be wrong.
    I refer to the standard "LevMar" VI as being linear, because it assumes a linear relationship between the variable variation and the end mse used for optimisation. This is where the "Solve linear Equations" comes in. Since the relationship is almost certainly not linear (foe example when peaks overlap), I thought maybe the non-linear coefficient guess may yield better results. I've had a quick look through the non-linear LEV-MAR function, but don't understand it yet ot the extent I understand the linear one. It does indeed seem to take a slightly different approach (once you look past the whole parsing code of the "linear" function.
    I'll need some time to get some understanding of the non-linear code.
    Attached are some example spectra (One which works, and one which doesn't).
    Thanks again
    Shane
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Spectra.zip ‏3 KB

  • Hp prime calculator Cannot Solve simple equation

    Hello,
    I'm trying to solve
     solve( (2)^x = (x)^2,x)
    But the calculator cannot solve or am I doing somthing wrong?.
    I lost my TI Nspire CX and I though that HP Prime, since is a recent modern version, were able to solve something simple as that, I am wrong. (TI Nspire solved it ).
    How solve the above equation using the HP Prime? I'm seriusly thinking to return this back.
    Thank you
    This question was solved.
    View Solution.

    Oops!  Quite right.  In general, all symbolic math work should be done in the CAS; that's what it's for.  Home is intended for ordinary number-crunching, not symbolic math.  Sorry for not pointing that out.
    -Joe-

  • HP50g: solve quadratic equations

    How would you solve a quadratic equation on the HP50g? I already know how to use the normal algebraic solver, but I can't solve x^2+2x+1=0, for example. Also, when I hit EXPAND ((x+2)*(x-2)), like the integrated help forum says, it doesn't come up with the solution set. It comes up with -9.9999999E499, which is obviously not the correct answer. How do I change both of these?

    Hi,
    There are several ways to find the roots.
    Method 1:
    A useful method is to use the numerical solver:
    Red-Right-Shift    NUM.SLV  (on 7 key), then choose "3. Solve poly.."
    Enter the vector of coefficents, e.g. for x^2+2x+1=0 enter [1,2,1] then with Roots section highlighted, choose F6 SOLVE
    Answer is [-1 -1]
    for example x^2-4=0 enter [1,0,-4]
    Answer is [-2 -2]
    Method 2a:
    Another method is to use the SOLVE command, White-Left-Shift   S.SLV, 6.SOLVE (or F6 SOLVE if using soft menus).
    In RPN mode:
    'X^2-4'
    'X'
    SOLVE
    Answer: {X=-2 X=2}
    Algebraic mode:
    SOLVE(X^2-4,X)
    Answer: {X=-2 X=2}
    Method 2b:
    As a shortcut you can use SOLVEVX command, White-Left-Shift   S.SLV, 5.SOLVEVX (or F5 SOLVEVX if using soft menus).
    With this command, the current active variable is assumed to be soved for (indicated on the top of the screen, usually 'X'). You then do not need to specify the variable to solve for.
    In RPN mode:
    'X^2-4'
    SOLVEVX
    Answer: {X=-2 X=2}
    Algebraic mode:
    SOLVEVX(X^2-4)
    Answer: {X=-2 X=2}
    Please see page 3-229 & 3-230 in the Advanced User's Reference Manual (v2) for notes and flag settings for the various SOLVE commands.
    You can download the Advanced User's Reference Manual (v2) from this web page:
    http://h10025.www1.hp.com/ewfrf/wc/manualCategory?cc=us&dlc=en&lc=en&product=3235175&
    (section 3 of this reference details each command of the 50g)
    Hope this helps.
    Note: I do not work for HP, I just like playing with calculators :-)

Maybe you are looking for

  • Sending Alerts raised in BPM to Email and also to Alert Inbox

    Hi, Currently BPM is designed to send the alerts to Alert inbox of Fixed recipients. For this alert category, in the properties 'Dynamic Text' is checked. But the current requirement is to send those alerts to Email also. Anybody help me by providing

  • The Dreaded Grey Square........[i]but wait![/i]

    I've contracted the grey square issue on iTunes (from fannying about trying to figure out how to rename image files so that they correspond on iTunes and Finder). I've followed the instructions which appear in duplicate throughout this section howeve

  • GREP to find string of quotes

    I have some strange "strings" of quotes for which I need to search where there are consecutive single and double quotes with nothing between them. So "'"'Wording here.'"' More here." Can GREP be used to find a string of quotes that might consist of a

  • I cannot share or send comments on facebook

    i can enter replies to comments on face book but cannot send them i cannot like something because it takes me completely to a blank page its like its frozen

  • How to access sys owned objects for role based web user?

    Hi, we have tables and packages etc owned by test schema user, and we access the applications using mod pl/sql though DAD. we created a webuser role and granted the execute privillages to webuser role. we have some packages that we access sys owned s