search for: resid3

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

Did you mean: reside
2013 Apr 22
0
Copula fitMdvc:
...ameter. Can somebody guide me where my mistake is. Thanks, Elisa. ################################# #### OLS ESTIMATION fit1 <- lm(Y1 ~ Xi) fit2 <- lm(Y2 ~ Xi) fit3 <- lm(Y3~ Xi) resid1 <- Y1-as.matrix(cbind( 1,Xi))%*%fit1$coef resid2 <- Y2-as.matrix(cbind( 1,Xi))%*%fit2$coef resid3 <- Y3-as.matrix(cbind( 1,Xi))%*%fit3$coef sigma1<-sum(resid1*resid1)/nrow(Xi) sigma2<-sum(resid2*resid2)/nrow(Xi) sigma3<-sum(resid3*resid3)/nrow(Xi) rho12<- cor(resid1, resid2) rho13<- cor(resid1, resid3) rho23<- cor(resid2, resid3) library("copula") library(mvtnorm...