@startz, thanks for your answer. Following what you recommended, I did the following:
df<-structure(list(Locations=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), Production = c(239.936, 422.18352, 5.863376, 23.9936, 406.09168, 143.9616, 42.348704, 61.67968, 12.956544, 182.058268,6168.5,714.593,268.545,175.2,227.5775
), Consumption = c(467.36, 795.2, 176.2, 467.36,
738.5, 2226.36, 107.13, 198.63,
210.3, 1198.96,"","","","","")), row.names = c(NA, 15L), class = "data.frame")
df<-df%>% mutate(Production=as.numeric(Production),Consumption=as.numeric(Consumption))
myModel <- lm(Consumption~Production,data=df)
> myModel
Call:
lm(formula = Consumption ~ Production, data = df)
Coefficients:
(Intercept) Production
449.406 1.357
Eu pedi para um professor verificar o melhor fit para este caso e me deu a seguinte resposta: Using the least squares method, the best fit for this case is :
g(p)=0.7533+46.1266√(p)
You know how I can find the best fit. I believe you must have to use lm right? Any tips?