Hello,
You get the fitted values for years 2000, ..., 2019.
Those values are the original series minus the residuals:
f <- fitted(model1)
g <- yy - resid(model1)
identical(f, g) # returns TRUE
If you want to *forecast*, this will give you the default h = 10
forecasts.
fc <- forecast(
Sent from my iPhone
> On Feb 1, 2021, at 10:16 PM, David Winsemius wrote:
>
> Or perhaps:
>
> W <- 1:2000
> W[z>4|z<2] <- 0
Another way:
W <- (1:2000)*(z>4|z<2)
As I said earlier you really should study logical class vectors and the
operators that use them and how to apply them as indi
Or perhaps:
W <- 1:2000
W[z>4|z<2] <- 0
Sent from my iPhone
> On Feb 1, 2021, at 9:56 PM, David Winsemius wrote:
>
> Or perhaps you wanted:
>
> W <- z
> W[z>4|z<2] <- 0
>
> Sent from my iPhone
>
>>> On Feb 1, 2021, at 9:41 PM, David Winsemius wrote:
>>>
>> Just drop the “+” if you want
Or perhaps you wanted:
W <- z
W[z>4|z<2] <- 0
Sent from my iPhone
> On Feb 1, 2021, at 9:41 PM, David Winsemius wrote:
>
> Just drop the “+” if you want logical.
>
> Sent from my iPhone
>
>>> On Feb 1, 2021, at 9:36 PM, Shaami wrote:
>>>
>>
>> Hi Prof. David
>>
>> Thank you. I will al
Just drop the “+” if you want logical.
Sent from my iPhone
> On Feb 1, 2021, at 9:36 PM, Shaami wrote:
>
>
> Hi Prof. David
>
> Thank you. I will always follow your advice. The suggested code worked. It
> gives either 1 or 0 depending on the condition to be true. I want index of z
> for w
IMTS length 2000
Sent from my iPhone
> On Feb 1, 2021, at 9:16 PM, David Winsemius wrote:
>
> Cc’ed the list as should always be your practice.
>
> Here’s one way (untested):
>
> W <- +(z>4| z<2) # assume z is of length 20
>
> —
> David
>
> Sent from my iPhone
>
>>> On Feb 1, 2021, at 7
Cc’ed the list as should always be your practice.
Here’s one way (untested):
W <- +(z>4| z<2) # assume z is of length 20
—
David
Sent from my iPhone
> On Feb 1, 2021, at 7:08 PM, Shaami wrote:
>
>
> Hi Prof. David
>
> In the following state
>
> W = (1:2000)[z >4|z<2)
>
> Could you ple
Dear Rui Barradas
Thank you very much for your reply.
However, still now, I have a confusion whether I get the fitted value for
the year 2000, 2001, ..., 2020 or 2001, 2002, ..., 2021.
Need any more help.
Thanks in advance.
Md
On Thu, Jan 28, 2021 at 4:47 PM Rui Barradas wrote:
> Hello,
>
>
Hi Duncan
It worked. Thank you.
Best Regards
On Mon, Feb 1, 2021 at 6:26 PM Duncan Murdoch
wrote:
> On 01/02/2021 7:03 a.m., Shaami wrote:
> > z = NULL
> > p = 0.25
> > x = rnorm(100)
> > z[1] = p*x[1] + (1-p)*5
> > for(i in 2:100)
> > {
> >z[i] = p*x[i]+(1-p)*z[i-1]
> > }
>
> That's the s
Whenever using lda(...,CV=TRUE), or if using lda.predict(), a
classification is returned.
Which distance is used in order to allocate a given individual to a
class, once the original data have been transformed into discriminant
components?
Thanks
Agustin Lobo
aloboa...@gmail.com
> Martin Maechler
> on Sat, 30 Jan 2021 12:21:14 +0100 writes:
> Rolf Turner
> on Sat, 30 Jan 2021 16:11:32 +1300 writes:
>> On Fri, 29 Jan 2021 12:47:25 + Nasia Petsa
>> wrote:
>>> Dear all,
>>>
>>> I have the following problem with determinin
On 01/02/2021 7:03 a.m., Shaami wrote:
z = NULL
p = 0.25
x = rnorm(100)
z[1] = p*x[1] + (1-p)*5
for(i in 2:100)
{
z[i] = p*x[i]+(1-p)*z[i-1]
}
That's the same as
p <- 0.25
x <- rnorm(100)
z <- stats::filter(p*x, 1-p, init = 5, method="recursive")
This leaves z as a time series; if that cau
Hi David and Charles
Your suggestions helped me a lot. Could you please suggest how I could
vectorize the following for loop?
z = NULL
p = 0.25
x = rnorm(100)
z[1] = p*x[1] + (1-p)*5
for(i in 2:100)
{
z[i] = p*x[i]+(1-p)*z[i-1]
}
Thank you
Regards
On Mon, Feb 1, 2021 at 11:01 AM David Winsemi
Dear R users:
R2BEAT 1.0.2 is now available on CRAN
[ https://cran.r-project.org/web/packages/R2BEAT/index.html |
https://cran.r-project.org/web/packages/R2BEAT/index.html ]
This package covers the two-stage stratified sample design,
offering functions for determining the optimal allocation of
14 matches
Mail list logo