In R (2.15.2) I fitted once an ARIMA(3,1,3) on a time series and once an ARMA(3,3) on the once differenced timeseries. The fitted parameters differ, which I attributed to the fitting method in ARIMA.   Also, fitting an ARIMA(3,0,3) on the same data as ARMA(3,3) will not result in identical parameters, no matter the fitting method I use.  I am interested in identifying where the difference comes from and with what parameters i can (if at all) fit the ARIMA to get the same coefficients of the fit as from the ARMA.  Sample code to demonstrate:  library(tseries) set.seed(2) #getting a time series manually x&lt;-c(1,2,1) e&lt;-c(0,0.3,-0.2) n&lt;-45 AR&lt;-c(0.5,-0.4,-0.1) MA&lt;-c(0.4,0.3,-0.2) for(i in 4:n){ tt&lt;-rnorm(1) t&lt;-x[length(x)]+tt+x[i-1]*AR[1]+x[i-2]*AR[2]+x[i-3]*AR[3]+e[i-1]*MA[1]+e[i-2]*MA[2]+e[i-3]*MA[3] x&lt;-c(x,t) e&lt;-c(e,tt) } par(mfrow=c(2,1)) plot(x) plot(diff(x,1))  #fitting different versions. What I would like to get is fit1 with ARIMA() fit1&lt;-arma(diff(x,1,lag=1),c(3,3),include.intercept=F) fit2&lt;-arima(x,c(3,1,3),include.mean=F) fit3&lt;-arima(diff(x,1),c(3,0,3),include.mean=F) fit4&lt;-arima(x,c(3,1,3),method="CSS",include.mean=F) fit5&lt;-arima(diff(x,1),c(3,0,3),method="CSS",include.mean=F)  cbind(fit1$coe,fit2$coe,fit3$coe,fit4$coe,fit5$coe)   Edit: Using the conditional sum of squares comes pretty close, but is not quite there. Thanks for the hint for the fit1!  Edit2: I do not think this is a duplicate. Points 2 and 3 address different problems than mine, and even if I override the initialisation mentioned in point 1 by   fit4&lt;-arima(x,c(3,1,3),method="CSS",include.mean=F,init=fit1$coe)   I still get different coefficients
Is it better to difference a series (assuming it needs it) before using an Arima OR better to use the d parameter within Arima?  I was surprised how different the fitted values are depending on which route is taken with the same model and data. Or am I doing something incorrectly?  install.packages("forecast") library(forecast)  wineindT&lt;-window(wineind, start=c(1987,1), end=c(1994,8)) wineindT_diff &lt;-diff(wineindT)  #coefficients and other measures are similar modA&lt;-Arima(wineindT,order=c(1,1,0)) summary(modA) modB&lt;-Arima(wineindT_diff,order=c(1,0,0)) summary(modB)  #fitted values from modA A&lt;-forecast.Arima(modA,1)$fitted  #fitted from modB, setting initial value to the first value in the original series B&lt;-diffinv(forecast.Arima(modB,1)$fitted,xi=wineindT[1])   plot(A, col="red") lines(B, col="blue")   ADD:  Please note I am differencing the series once and fitting arima (1,0,0) then I am fitting arima (1,1,0) to the original series. I am (I think) reversing the differencing on the fitted values for the arima(1,0,0) on the differenced file.   I am comparing the fitted values - not the predictions.  Here is the plot (red is arima(1,1,0) and blue is the arima (1,0,0) on the differenced series after changing back to the original scale)  :    Response to Dr. Hyndman's Answer:  1) Can you illustrate in R code what I would need to do in order to get the two fitted values (and presumably forecasts) to match (allowing for small difference due to your first point in your answer) between Arima (1,1,0) and Arima(1,0,0) on the manually differenced series? I assume this has to do with the mean not being included in modA, but I am not entirely sure how to proceed.  2) Regarding your #3. I know I am missing the obvious, but are not $\hat{X}_t = X_{t-1} + \phi(X_{t-1}-X_{t-2}) $ and $\hat{Y}_t = \phi (X_{t-1}-X_{t-2})$ the same when $\hat{Y}_t$ is defined as $\hat{X}_t - X_{t-1}$? Are you saying I am "undifferencing" incorrectly?
For $a,b,c>0$, prove that $\frac{a^2}{b}+\frac{b^2}{c}+\frac{c^2}{a}\ge a+b+c+\frac{4(a-b)^2}{a+b+c}$ Do I need to have antivirus software installed? I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday.  This leads to the following questions:   How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option? Computing $\sum_{k=1}^{\infty}\frac{1}{k}\int_{\pi k}^{\infty}\frac{\sin(x)}{x}dx$ I was asked to evaluate the following sum: $$\sum_{k=1}^{\infty}\frac{1}{k}\int_{\pi k}^{\infty}\frac{\sin(x)}{x}dx$$  I'm trying to use $$\int_{0}^{\infty} \frac{\sin(x)}{x}dx=\frac{\pi}{2}$$ However, it doesn't seem to work. Any help is greatly appreciated. Why do tuning forks have two prongs? I believe the purpose of a tuning fork is to produce a single pure frequency of vibration.  How do two coupled vibrating prongs isolate a single frequency?  Is it possible to produce the same effect using only 1 prong?  Can a single prong not generate a pure frequency?  Does the addition of more prongs produce a "more pure" frequency?  The two prong system only supports a single standing wave mode, why is that? Is it possible to activate an iPhone 4 without a SIM? So we bought an iPhone 4 from the Apple store. But we didn't get a micro-SIM as there are no PAYG tariffs on micro-SIM available.  Is there anyway to activate the device without getting hold of a SIM? I don't want to sign up to a contract just to develop with. Is it possible to do a multiline pattern match using sed, awk or grep? Take for example, I would like to get all the lines between { and }  So it should be able to match    1. {}  2. {.....}  3. {.....      .....}  Initially the question used &lt;p&gt; as an example. Edited the question to use { and}. I'm using a common charger for both of my laptops.  The charger is specified at 20 Volts and 3.25 Amperes. My other laptop has a specification of 19 V and 3.42 A.  Is it safe to charge my laptop with chargers whose specifications exceed or are not equal to the mentioned specifications?  I have read somewhere that it may cause some damage if the voltage or amperage is not matching the specs. Can we have a moderator only "flag for community team/developer attention" link on posts? There are times when moderators come across things that only Stack Exchange employees can deal with. These include things like deleting sensitive information permanently from posts disassociating users from posts that require direct database access.  (The previous use case is now possible for moderators to do directly the moderator redaction tool)  Currently the workflow is:   See the post (either in normal site usage or via a flag) Go to chat Ping one of the community team (if they are around) Explain the problem   A far better workflow for the moderator would be to simply able to flag the post so it then appeared in an "employee only" queue somewhere. This could either be a page on the main Stack Exchange site or (better still) their inbox.  (OK I admit I hadn't fully thought this last bit out.)  This could either be a moderator "flag to devs" link on the post or a new option on the existing flag dialog (probably the better solution).  Now that moderators can't merge we have a fairly common situation where this would be very useful. A new users posts an answer (or question on sites that don't require registration) then loses their cookies and ends up creating another unregistered account (or two). Eventually the might even create a registered account. It used to be easy to merge the unregistered accounts into the registered ones, but now we either have to badger the OP to use the "merge accounts" form or ping the team somehow.  Having the "flag for team" option would be very useful in this scenario. The ring $ℤ/nℤ$ is a field if and only if $n$ is prime Let $n \in ℕ$. Show that the ring $ℤ/nℤ$ is a field if and only if $n$   is prime.   Let $n$ prime. I need to show that if $\bar{a} \neq 0$ then $∃\bar b: \bar{a} \cdot \bar{b} = \bar{1}$. Any hints for this ?  Suppose $ℤ/nℤ$ is a field. Therefore: for every $\bar{a} \neq 0$ $∃\bar b: \bar{a}\cdot \bar{b}=1$. How can I show that $n$ must be prime ? If you go to review a suggested edit and close the Reject dialogue box, the button at the top-right will continue to say "Rejecting...". You will not be able to continue with the review process.  I have refreshed the page, and tried clearing my cache. If I refresh the page, I can continue reviewing the edit.  I'm using Chrome Version 31.0.1650.57 m. If $A$ and $B$ are positive definite, then is $B^{-1} - A^{-1}$ positive semidefinite? Sci-fi novel involving living forever through teleporter copies Is there a tool to get the lines in one file that are not in another? Independence of points from same underlying function I have a function $y=sin(x)$  I sample the points $ x_i=\{0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1\}$ and $$ y_i=sin(x_i) + \epsilon \  \ \epsilon \sim iid\ Normal$$  Now given only the set $\{x_i,y_i\}$ I want to uncover the underlying functional form $f(x)$ given as  $$y=f(x)+\epsilon \ \ \ \ \epsilon \sim iid\ Normal  $$  My question is : ARE $y_i$'s independent ?  My intuition is that $y_1$ and $y_2$ are not independent. This is because given a new ${x}$ say ${x_\star}$ we can use $y_i$'s to learn some information about ${y_\star}$.   Does the fact that the input points come from the same underlying function make them somehow correlated or posses commonalities ? and if not why do most methods (ex: Non-parametric splines, Gaussian process) use the $y_i$'s to get information and learn ${y_\star}$ ? Isn't the fact that if samples are independent then they can't learn new information from each other ? Convergence of sequence of real numbers and (sub)subsequence Let $(x_n)_{n\in \mathbb{N}}$ be a sequence of real numbers. A well known result is:     The sequence $(x_n)_{n\in \mathbb{N}}$ converges to $a\in \mathbb{R}$ if and only if every subsequence $(x_{n_k})_{k\in \mathbb{N}}$ converges to $a\in \mathbb{R}$.   Now, I'm working on an exercise which essentialy asks to prove the following:     The sequence $(x_n)_{n\in \mathbb{N}}$ converges to $a\in \mathbb{R}$ if and only if for every subsequence $(x_{n_k})_{k\in \mathbb{N}}$ there is a (sub)subsequence $(x_{n_{k_j}})_{j\in \mathbb{N}}$ which converges to $a$.   Now, one direction is trivial. If in fact $(x_n)_{n\in \mathbb{N}}$ converges to $a$, then by the result I've mentioned, every subsequence of $(x_{n})_{n\in \mathbb{N}}$ converges to $a$. Let then $(x_{n_k})_{k\in \mathbb{N}}$ be an arbitrary subsequence. In that case, we know that it is a subsequence of itself, and hence we've found a (sub)subsequence which converges to $a$.  The other way around seems quite complicated for me. The reason is as follows: I must assume that every subsequence $(x_{n_k})_{k\in \mathbb{N}}$ has a (sub)subsequence which converges to $a$ and the proof that the original one converges to $a$.  My problem is exactly that "a". If it had all (sub)subsequences converging to $a$, then by the result i've mentionted, the subsequence $(x_{n_k})_{k\in \mathbb{N}}$ would converge to $a$. In that case, we would have every subsequence converging to $a$ and the result would follow.  My idea to prove the claim was then:  First remember that a subsequence is the restriction of the original one $x: \mathbb{N}\to \mathbb{R}$ to an infinite subset $\mathbb{N}'\subset \mathbb{N}$. In that case a (sub)subsequence is the restriction of $\tilde{x} = x|\mathbb{N}'$ to an infinite subset $\mathbb{N}''\subset \mathbb{N}$. But since $\tilde{x}$ is the restriction of $x$ to $\mathbb{N}'$ and since $\mathbb{N}''\subset \mathbb{N}'$, the restriction of $\tilde{x}$ to $\mathbb{N}''$ is itself the restriction of $x$ to $\mathbb{N}''$.  In other words, every (sub)subsequence can be viewed as a subsequence of the original one. Considering this, by hypothesis every subsequence has a (sub)subsequence which converges to $a$. But by this argument, this means that we can replace every subsequence with a convergent one. And then we can use the result I stated.  Is my idea correct? Is this really the way to prove the claim? My only doubt is that I need every subsequence converging to $a$ to use the result. In this case I can't see how I can argue that this implies every subsequence converges to $a$.  How can I finish this proof? Stein's lemma condition (Apologies if I break some conventions, this is my first time posting!)  I am working on proving Stein's characterization of the Normal distribution: for Z $\sim N(0,1)$ and some differentiable function $f$ with $E[|f'(Z)|] &lt; \infty$, $$E[Zf(Z)] = E[f'(Z)]$$ Writing the LHS expression in integral form and integrating by parts, I eventually obtain: $$E[Zf(Z)] = \frac{1}{\sqrt{2\pi}} \left[ -f(z) \cdot \exp \left\{ \frac{-z^2}{2} \right\} \right] \Bigg|_{-\infty}^{\infty} + E[f'(Z)]$$ Now I need to show that the first expression on the right hand size is zero. Intuitively, this seems clear because of the exponential term, but I am having trouble explicitly applying the condition on $f'$ to prove this rigorously. Any ideas? CBC-MAC Padding weaknesses Possible Duplicate:             When I listen to major news programs, often I notice that they seem to intentionally omit "the" before the name of the government organizations. For example:     We contacted E.P.A. for comment but they refused our requests.   or     Others consider the actions of treasury to be detrimental to the economy.   These just sound wrong to me. I think it should be "the E.P.A" or "the treasury". However I most often hear this on very credible news programs (The PBS News Hour and Frontline come to mind) so I am sure they know what they're doing...  Is it proper to use "the" before the name of a government organization, or is it optional? How to distinguish gift from payment for the service? If somebody gives me reasonable advise or share important to me information.   Being attentive I would like to make a little gift or give some little (&lt;100$) amount of money (cash/wire/online) for that   How it would be classified by IRS?   Which obligations originate with this matter for me and my party?  How to do this in a most comfortable way to my party? Product of pairwise coprime integers divides $b$ if each integer divides $b$ Let $a_1....a_n$ be pairwise coprime.  That is $gcd(a_i, a_k) = 1$ for distinct $i,k$, I would like to show that if each $a_i$ divides $b$ then so does the product.  I can understand intuitively why it's true - just not sure how to formulate the proof exactly. I want to say if we consider the prime factorizations of each $a_i$, then no two prime factorizations share any prime numbers.   So the product of $a_1...a_n$ must appear in the prime factorization of $b$.  Is this correct?  Or at least if if the idea is correct, any way to formulate it more clearly?