答案 0 :(得分:1)
欢迎您,祝您好运。不要忘记注意评论(它们确实相关,您可以增加获得答案的可能性)。
请参见以下使用df[['initialprice', 'price', 'high', 'low']]
initialprice price high low
BTC-ACM 0.00000380 0.00000428 0.00000510 0.00000351
BTC-AEON 0.00010652 0.00011040 0.00013774 0.00010616
包使用贝叶斯单变量回归的示例。
Bolstadt
library(Bolstad)
# Simulation of Power vs Wind
# Power = 5 * Windspeed ^ 2
set.seed(123)
n <- 100
# y = Power
# x = WindSpeed
# e = error term
x <- (1:(25 * n))/ n
e <- rnorm(length(x)) / 10
# y = a * x ^ b
# log(y) = log(a) + b * log(x) + e
# or
# in exponential form
y <- exp(log(5) + e) * x ^ 2
# bayes univariate linear regression model
z <- bayes.lin.reg(log(y), log(x))
# Standard deviation of residuals: 0.0943
# Posterior Mean Posterior Std. Deviation
# -------------- ------------------------
# Intercept: 6.076 0.0059657
# Slope: 1.996 0.0062209