我不断收到“扫描的无效或意外令牌”,但我找不到问题。有人能帮助我吗?
model {
for (i in 1: n ) {
dummy[i] <- 0
x [ i ] <- y [ i ]
dummy[ i ] ~ dloglik ( logLike [ i ] )
z [ i ] <- ( x [ i ] - mu) / sigma
w [ i ] <- abs( z [ i ] / t [ i ])
a1 [i] <- ( sin(3.14159 * alpha * y [ i ] + b1 ) ) / cos (3.14159 * y [ i ])
a2 [ i ] <- ( cos( 3.14159* y [ i ] ) ) / cos ( 3.14159 * ( alpha - 1) * y [i ] + b1)
a3 <- pow (a2 [i], theta2)
t [ i ] <- a1 [ i ] * a3 [ i ]
loglLike [ i ] <- log (alpha) - log( abs(alpha -1) ) - log (sigma) - pow(w [ i ], theta1) + theta1*log ( w[ i ]) - log (abs ( z[ i ] ))
y[ i ] ~ dunif ( -0.5, 0.5)
}
theta1 <- alpha / (alpha-1)
theta2 <- (alpha -1)/alpha
b1 <- ( beta* min(alpha, 2-alpha)*3.14159)/2
alpha ~ dunif (1, 2)
beta ~ dunif ( -1, 1)
sigma ~ dunif (0, 2)
mu ~dunif (-2, 2)
}