Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Problem in the documentation for the autoregressive moving average model

Đang mở
#884 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Tài liệu
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
tex
Lĩnh vực
documentation

Hướng nghiên cứu

Đọc phần moving-average-models được liên kết và so sánh phần này với phần autoregressive, tập trung vào các phương trình ARMA được hiển thị và phần thảo luận về các ràng buộc tính dừng. Kiểm tra xem điều kiện ban đầu, hiệu chỉnh trung bình và các ràng buộc đối với tham số bậc cao hơn có nhất quán hay không, sau đó cập nhật tài liệu để các phương trình và ràng buộc dự kiến được nêu rõ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I'm sorry if i'm wrong, but it looks like an error to me. This is the code shown in the documentation which i link here

data {
  int<lower=1> T;            // num observations
  array[T] real y;                 // observed outputs
}
parameters {
  real mu;                   // mean coeff
  real phi;                  // autoregression coeff
  real theta;                // moving avg coeff
  real<lower=0> sigma;       // noise scale
}
model {
  vector[T] nu;              // prediction for time t
  vector[T] err;             // error for time t
  nu[1] = mu + phi * mu;     // assume err[0] == 0
  err[1] = y[1] - nu[1];
  for (t in 2:T) {
    nu[t] = mu + phi * y[t - 1] + theta * err[t - 1];
    err[t] = y[t] - nu[t];
  }
  mu ~ normal(0, 10);        // priors
  phi ~ normal(0, 2);
  theta ~ normal(0, 2);
  sigma ~ cauchy(0, 5);
  err ~ normal(0, sigma);    // error model
}

in the code nu_1 is set to mu + phi * mu. This is already cryptic to me. If we assume for semplicity that y_0 and err_0 begin at their respective mean, nu[1] should be equal simply to mu. For the same reason the assignment nu[t] = mu + phi * y[t - 1] + theta * err[t - 1]; feels wrong to me. it should be
nu[t] = mu + phi * (y[t - 1] - mu) + theta * err[t - 1]: in the ARMA(1, 1) process and in general in every ARMA(p, q) it should be the sequenze y_t = x_t - mu that follows y_t = phi * y_t-1 + z_t + theta z_t-1.

Beside the above problem that i find most important, i found some inconsistency in the documentation. In the section for the autoregressive model it's suggested to leave unconstrained the parameter phi in order to assess stationarity. But in the ARMA section it's suggested that if there's no suspect of a non stationary time series to constrain the parameters phi. In the documentation it's not clear by the way what should be the constraint for higer order ARMA since constraining them in (-1, 1) it's probably not sufficient, and i don't even know if there's a constrain on the parameters in closed form

Ngôn ngữ chính
TeX
Star
43
Fork
133
Merge trung bình
11 giờ 32 phút
Pull request đã merge (30 ngày)
4

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stan-dev/docs

Tất cả issue của stan-dev/docs

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.