Hi, I need to loop this sequence so that I end up with 5 dataframes (eks_2013, eks_2014) etc. This sequence make it for 2013 alone.
(df_p_2013 and df_q_2013 are dataframes with prices and quantities for 2013)
prices <- colnames(df_p_2013)
quantities <- colnames(df_q_2013)
output_2013 <- matrix(NA, nrow=22, ncol=22)
for (tt in 1:22) {
output_2013[[tt]] <- as.data.frame(priceIndex(prices, quantities, tt, df_tot_2013, method= "Fisher"))
}
## Extracting the columns i need from the list.
f_2013 <- do.call(cbind.data.frame, output_2013[1:22])
## Naming rows and columns
rownames(f_2013) <- country_vector
colnames(f_2013) <- paste("base", rownames(f_2013), sep=".")
## Applying the eks-method on the fisher-matrix
eks_2013 <- eks(f_2013)
colnames(eks_2013) <- paste("base", rownames(eks_2013), sep=".")
Anyone have any ideas?
Thanks!