I have some doubts which
R function choose for my task. Lets imagine we have two types of objects "tree" and "grass" . I've estimated the height of both multiple independent trees and grasses. And i would like to understand whether is there a statistical significant contrast of height between trees and grasses? Which
R function will be appropriate in my case? Also i have exactly the same task but with four groups of objects (trees,conifers,grasses,flowers). Which function should i use in that case? I used for both tasks
lm() R function. Is it correct?
Also the problem that my linear models very often look like:
Call: lm(formula = count ~ type, data = table_lm) Residuals: Min 1Q Median 3Q Max -0.9032 0.0000 0.0000 0.0000 1.0968 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.00000 0.08406 23.792 < 2e-16 *** typeother -1.09677 0.13837 -7.926 9.78e-12 *** --- Residual standard error: 0.612 on 82 degrees of freedom Multiple R-squared: 0.4338, Adjusted R-squared: 0.4269 F-statistic: 62.82 on 1 and 82 DF, p-value: 9.78e-12
Both p-values of
t-statistic are significantly lower then 0.05. But the
Multiple R-squared value is too low and because of that i can not say that i have statistically significant contrast between groups under investigation, the overall model quality too bad. How i can solve the problem?