After finding a regression prediction in lm I want to return only last two lines of the summary. What would be the best function to use?
my_model_lm(y ~ x1 + x2 + x3, data = [data])summary_result <- summary(my_model)
I want to return only:Multiple R-squared: [value], Adjusted R-squared: [value]F-statistic: [value] on [value] and [value] DF, p-value: < [value]
I tried the tail()
function, cat()
function, summary(my_model$)r.squared
at some basic level.Was not able to return the desirable output.