search for: x_tild

Displaying 1 result from an estimated 1 matches for "x_tild".

Did you mean: x_tilde
2010 Mar 09
1
error in a function
Hallo! I have the following function: cLL_beta <- function(beta){ sumterm=0 a=1 b=0 S=I_n-lambda*w R=I_n-rho*w det_R=det(S) det_S=det(R) for (i in 1:t){ b=i*n y_ausgew=y_tilde[a:b]#y_ausgew ist numeric y_aus=matrix(y_ausgew)#Typen anpassen X_ausgew=X[a:b,]#X_ausgew ist eine Matrix x_tilde=X_ausgew-1/t*x_t #x_tilde ist auch eine Matrix ####X_aus=matrix(X_ausgew) V1=R%*%(S%*%y_aus-x_tilde%*%beta) V11=t(V1) V2=V11%*%J_n V_tilde=V2%*%V1 sumterm=sumterm+V_tilde a=b+1 } -((n*t)/2)*log(2*pi*sigm_sq)+t*(log(det_S)+log(det_R))-1/(2*sigm_sq)*sumterm } where beta is a matrix (2x1), X is a m...