Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
R")
data = read.table ("data.txt", header = TRUE)
x <-data $ cpi
y <-data $ rpi
z <-data $ m2
cpi.lstar <-lstar (x, m = 2, d = 1, thVar = z, control = list (maxit = 3000))
cpi.lstar
names (cpi.lstar)
# [1] "str" "coefficients" "fitted.values" "residuals" "k"
# [6] "model" "model.specific"
g = cpi.lstar $ coefficients [7]
th = cpi.lstar $ coefficients [8]
gfun <-function (y, g, th) 1 / (1 + exp (-g * (y-th)))
G = gfun (z, g, th)
par (mfrow = c (2,1))
plot (G, type = "l", col = "red")
plot (G, z)
epoch is a very good teacher, thank you very much! Really a good teacher, just do
n’t know where he is now.
This article comes from: S-Plus & R Special Edition of the National