1

I had to find the equation of curve that represent my data. After trying different function, I got a models that seems fitting my data, at least by plotting them. But this is it. I have no idea how to understand if my model is good, based on the summmary of my model. I have no good statistical background(sorry!) and I am working since few months with R.

This are my data:

structure(list(height = 3:16, Suitable_Area = c(12153L, 9789L, 8712L, 7985L, 7574L, 7086L, 6543L, 6242L, 5943L, 5559L, 5188L, 4898L, 4680L, 4515L), Group = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "Consecutive Suitable Area", class = "factor")), row.names = c("3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"), class = "data.frame")

This is the function of the curve fitting my data

#Hyperbola for SPLIT 1
  #y = (a + (b * x)) / (c + x)

fitHyperbola <- nlsLM( Suitable_Area ~ (a + (b * height))/(c+height), data = Split1 , start = list(a = -3.62, b=1.67,c=-2.50))

model on my data

At this point, I would look for the RMSE or the R-squared. I am able to get them by doing a summary of a linear model, but not with nlsLM, which provide me info about the a,b, and c of the equation.

m_rub
  • 31
  • 4
  • 2
    What is your definition of "good"? Is your ultimate goal prediction or inference? Is there a scientific basis for choosing this specific functional relationship? – Roland Sep 09 '19 at 07:05
  • Also, `summary(fitHyperbola)` gives you the residual standard error. – Roland Sep 09 '19 at 07:10
  • If the curve representing the expectation of dot-points, then the Chi square goodness of fit statistics is defined by the mean of the normalized difference of dot-point and the curve points. –  Sep 09 '19 at 07:42
  • Hi everybody thanks for answering. Roland: I´m honestly not sure. I would say is a descriptive statistic. But having similar starting data the model will fit in other similar situation(prediction). Its like this sentence: "Having this kind of urban structure (among other things with maximum building height of 16 meters) the relation with Suitable Area(considering sunlight) goes like this hyperbole, the higher you go, the less suitable area you have." What I want to know is, if the curve is good ar representing my data or if it is too "rough". Carles: Ill check your link, thanks – m_rub Sep 09 '19 at 07:56
  • Looking at the plot, this doesn't seem like a bad fit (although there is rather strong auto-correlation in the residuals). However, I can't say whether this is a good fit because it is unclear what level of accuracy and precision you need. I might suggest plotting a confidence band. – Roland Sep 09 '19 at 08:27

0 Answers0