I have the following code for doing a linear regression:
data<-read.csv("File.csv",header=T)
trans<-log(data)
attach(trans)
outdata<-summary(lm(Y~A + B + C))
In the output what I have essentially is log(y)=b0+b1*log(A)+b2*log(B)+b3*log(C). In the summary output, R gives me coefficients for the log(A), log(B), and log(C). However, I would like the coefficients for A, B, and C. Is there a way to get R to give the output as 10^(b0), 10^(b1), and 10^(b2)?
A couple of things here:
logfunction in R uses baseeby default, so you really don’t want to exponentiate the coefficients using base 10 after transforming the data using basee.coef()or the less recommendedoutdata$coefficients[,1]. You can extract them directly and then transform them if you like.outdata$coefficientsand then print it. Most of the other information will end up nonsensical.