У меня есть список, который содержит что-то вроде следующего:
$AKAM
Augmented Dickey-Fuller Test
data: Cl(.)
Dickey-Fuller = -3.6785, Lag order = 3, p-value = 0.03802
alternative hypothesis: stationary
$ALXN
Augmented Dickey-Fuller Test
data: Cl(.)
Dickey-Fuller = -2.9311, Lag order = 3, p-value = 0.2052
alternative hypothesis: stationary
Я хочу фильтровать на основе p-value
. Я могу получить доступ к p-value
используя: d$AKAM$p.value
. Я хотел бы отфильтровать списки на основе критериев, что значение р <0,05. </p>
Данные:
d <- list(ABMD = structure(list(statistic = c(`Dickey-Fuller` = -2.88823930907752),
parameter = c(`Lag order` = 3), alternative = "stationary",
p.value = 0.222153876057991, method = "Augmented Dickey-Fuller Test",
data.name = "Cl(.)"), class = "htest"), ATVI = structure(list(
statistic = c(`Dickey-Fuller` = -2.86560166108736), parameter = c(`Lag order` = 3),
alternative = "stationary", p.value = 0.231115731952747,
method = "Augmented Dickey-Fuller Test", data.name = "Cl(.)"), class = "htest"),
ADBE = structure(list(statistic = c(`Dickey-Fuller` = -2.91292875187715),
parameter = c(`Lag order` = 3), alternative = "stationary",
p.value = 0.212379749850693, method = "Augmented Dickey-Fuller Test",
data.name = "Cl(.)"), class = "htest"), AMD = structure(list(
statistic = c(`Dickey-Fuller` = -3.46654255102478), parameter = c(`Lag order` = 3),
alternative = "stationary", p.value = 0.0592779965240372,
method = "Augmented Dickey-Fuller Test", data.name = "Cl(.)"), class = "htest"),
AKAM = structure(list(statistic = c(`Dickey-Fuller` = -3.67846516682619),
parameter = c(`Lag order` = 3), alternative = "stationary",
p.value = 0.0380202892654308, method = "Augmented Dickey-Fuller Test",
data.name = "Cl(.)"), class = "htest"), ALXN = structure(list(
statistic = c(`Dickey-Fuller` = -2.93110833009175), parameter = c(`Lag order` = 3),
alternative = "stationary", p.value = 0.205182767184581,
method = "Augmented Dickey-Fuller Test", data.name = "Cl(.)"), class = "htest"))