I am working on an investigation on ichthyofauna (study of fishes). I need to find the condition factor of the fish. The steps to find the condition factor are as follows:
1. W = aL^b... (1)
Where:
2. Log w = log a + b log L... (2)
Where:
3. K = 100 w/L^b... (3)
Where:
I understand that to calculate K, I must first obtain the regression slope (b of 1), then the co-efficient regression (b of 2) and finally K. I need help to do it in R. I would be very grateful for your support. Thanks and regards!
so for a very simple regression, you may want to start with a linear model, and you'd do something like this:
reg1 <- lm(log(W) ~ log(L), data=yourdataframename)
then check the summary for coefficients:
summary(reg1)
Note you don't need to take a log of the intercept because it is a column of ones essentially (but it is included implicitly unless you put '-1' in your parameters)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.