Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201977

How to rewrite the regression coefficients to form an equation?R

$
0
0
test<-lm(spreadsheet[,1]~spreadsheet[,2])
test<-test[1][[1]]
> test
(Intercept) spreadsheet[, 2] 
  359.6182526432944  -2.475447990866698 

how to write the coefficients of a regression in order to form an equation? So that it is possible to isolate "x". Expected output:

K= 359.6182526432944 -2.475447990866698 *x

x= -(17249403*K-6203200166)/42700000

I tried using expression function but it didn't work:

> eq<- expression(test[1][[1]]*x)
> eq
expression(test[1][[1]] * x)

Viewing all articles
Browse latest Browse all 201977

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>