This function is not normally used directly by the user.
It is used in the exact mle for mean.
Usage
Get1G(phi, n)
Arguments
phi
a vector of AR coefficients
n
length of series
Value
A vector used in the mle computation of the mean.
Author(s)
A.I. McLeod
See Also
GetARMeanMLE
Examples
#Simulate an AR(2) and compute the exact mle for mean
set.seed(7771111)
n<-50
phi<-c(1.8,-0.9)
z<-SimulateGaussianAR(phi, n)
g1<-Get1G(phi, length(z))
sum(g1*z)/sum(g1)
#sample mean
mean(z)
#more directly with getArMu
GetARMeanMLE(z,phi)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(FitAR)
Loading required package: lattice
Loading required package: leaps
Loading required package: ltsa
Loading required package: bestglm
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FitAR/Get1G.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Get1G
> ### Title: Internal Utility Function: BLUE Mean
> ### Aliases: Get1G
> ### Keywords: ts
>
> ### ** Examples
>
> #Simulate an AR(2) and compute the exact mle for mean
> set.seed(7771111)
> n<-50
> phi<-c(1.8,-0.9)
> z<-SimulateGaussianAR(phi, n)
> g1<-Get1G(phi, length(z))
> sum(g1*z)/sum(g1)
[1] 3.03722
> #sample mean
> mean(z)
[1] 3.908712
> #more directly with getArMu
> GetARMeanMLE(z,phi)
[1] 3.03722
>
>
>
>
>
> dev.off()
null device
1
>