title: Calculate error, MSE and MAPE?
body: <p>I created this program to estimate the Mean Squared Error (MSE), and Mean absolute percent error (MAPE):
  Is everything all right with this?
  <code>pune</code> is an .csv file with 22 data points.</p>
  
  <pre><code>pune &lt;- read.csv("C:/Users/ervis/Desktop/Te dhenat e konsum energji/pune.csv", header=T,dec=",", sep=";")
  pune &lt;- data.matrix(pune,rownames.force=NA)
  m1 &lt;- seq(from = 14274.19, to = 14458.17, length.out = 10000)
  MSE1 &lt;- numeric(length = 10000)
  for(i in seq_along(MSE1)) {
   MSE1[i] &lt;- 1 / length(pune) * sum((pune-m1[i]) ^ 2)
  }
  MAPE1 &lt;- numeric(length = 10000)
  for(i in seq_along(MAPE1)) {
   MAPE1[i] &lt;- 1 / length(pune) * sum(abs((pune-m1[i]) / pune))
  }
  </code></pre>
  
  <p>Am I right?</p>