Documente Academic
Documente Profesional
Documente Cultură
1
n
X x − x
i
fb(x) = K , x∈R
nh h
i=1
1
n
X x − x
i
fb(x) = K , x∈R
nh h
i=1
Noyau gaussien
1 u2
K(u) = √ exp − , u∈R
2π 2
1
n
X x − x
i
fb(x) = K , x∈R
nh h
i=1
Noyau gaussien
1 u2
K(u) = √ exp − , u∈R
2π 2
Pour ce noyau,
n
X 2
b 1 1 (x − xi )
f (x) = √ exp −
n 2πh 2h2
i=1
J.-C. Massé Université Laval
Estimateur à noyau décomposé
Tout estimateur à noyau est composé d’une somme de
n fonctions, soit une pour chaque observation.
> par(mfrow=c(1,2))
> taux = scan(“cdrate.dat”)
Jeu des taux d’épargne. Bimodal: deux types
d’institutions financières.
> par(mfrow=c(1,2))
> taux = scan(“cdrate.dat”)
Jeu des taux d’épargne. Bimodal: deux types
d’institutions financières.
Paramètre de lissage par défaut
> bw.nrd0(taux) h = 0.1152792 (Silverman)
> par(mfrow=c(1,2))
> taux = scan(“cdrate.dat”)
Jeu des taux d’épargne. Bimodal: deux types
d’institutions financières.
Paramètre de lissage par défaut
> bw.nrd0(taux) h = 0.1152792 (Silverman)
> bw.nrd(taux) h = 0.1357733 (Scott)
> bw.SJ(taux) h = 0.0687455 (Sheather-Jones)
> par(mfrow=c(1,2))
> taux = scan(“cdrate.dat”)
Jeu des taux d’épargne. Bimodal: deux types
d’institutions financières.
Paramètre de lissage par défaut
> bw.nrd0(taux) h = 0.1152792 (Silverman)
> bw.nrd(taux) h = 0.1357733 (Scott)
> bw.SJ(taux) h = 0.0687455 (Sheather-Jones)
> plot(density(taux,kernel=”rectangular”),xlab=”taux”,
ylab=”Densité”,main=”noyau rectangulaire”)
> plot(density(taux,kernel=”gaussian”),xlab=”taux”,
ylab=”Densité”,main=”noyau normal”)
#on utilise ici le paramètre de lissage par défaut (règle
de Silverman)
J.-C. Massé Université Laval
Deux estimateurs à noyau
Jeu cdrate.dat (69 taux d’intérêt), h Silverman
1.5
1.4
1.2
1.0
1.0
0.8
Densité
Densité
0.6
0.5
0.4
0.2
0.0
0.0
taux taux
J.-C. Massé Université Laval
Package sm
Fonction sm.density : > library(sm)
sm.density(x, h, model = "none", weights = NA,
group=NA, ...)#estimation avec le noyau gaussien
b f (x)R(K)
Var[f (x)] ≈
nh
b f (x)R(K)
Var[f (x)] ≈
nh
=⇒ Bande de confiance difficile à construire
b f (x)R(K)
Var[f (x)] ≈
nh
=⇒ Bande de confiance difficile à construire
On peut montrer que, indépendamment de f et x,
q h i q 2
b b b R(K)
Var f (x) = E f (x) − E f (x) ≈ .
4nh
q p q p
fb(x) ± 2 R(K)/4nh = fb(x) ± R(K)/nh
q p q p
fb(x) ± 2 R(K)/4nh = fb(x) ± R(K)/nh
q p q p
fb(x) ± 2 R(K)/4nh = fb(x) ± R(K)/nh
q p q p
fb(x) ± 2 R(K)/4nh = fb(x) ± R(K)/nh
1.0
0.8
0.6
densité
0.4
0.2
0.0
log(envergure)