![]() I’d like to know the correct R 2 when forcing intercept to zero to estimate the fitness of the regression model. This value is the same as Excel provided, but I’m pretty sure this R 2 is not correct. Residual standard error: 3.746 on 1331 degrees of freedom Lm(formula = grain_weight ~ 0 + grain_area, data = dataA) Intercept_zero=lm (grain_weight ~ 0 + grain_area, data=dataA) Since I had doubts about the accuracy of the R-squared value provided by Excel, I attempted to force the intercept to zero using R using the following code. Therefore, I am uncertain whether this regression model with an R-squared value of 0.99 is truly valid. Although the R-squared value is high, the residuals appear to be relatively large, which leads me to question the accuracy of the R-squared value provided by Excel. However, I have doubts about the accuracy of this regression model. I obtained a new regression model, y = 2.594x, with an R-squared value of 0.9938 after forcing the intercept to be zero. In Excel, we can force the intercept to zero by selecting ‘Set Intercept as 0’ in the ‘Format Trendline’ dialog box. To address this issue, we can simply force the intercept to be zero. However, this model predicts negative values of y for small values of x, which is unrealistic as it implies that the grain weight would become negative when the grain area decreases beyond a certain point. I obtained the equation y = 3.3333x - 13.7155, where y is the grain weight (mg) and x is the grain area (mm 2), using both Excel and R. Residual standard error: 2.965 on 1330 degrees of freedom Lm(formula = grain_weight ~ grain_area, data = dataA) Model=lm(grain_weight ~ grain_area, data=dataA) DataA=ame(read_csv(url(github),show_col_types = FALSE))
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |