1

please see my attached picture. somehow I always don't meet the quality standards. enter image description here

lilgrass
  • 13
  • 3
  • 2
    Please don't upload code, error messages, results or data as images for [these reasons](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question/285557#285557) - and [these](https://xkcd.com/2116/). – Limey Oct 24 '22 at 07:00

1 Answers1

0

Is this what you need?

This will perform iterations for each y and display the coefficients and p-values for them.

df = your data.frame name

for(i in 1:30)
{ 
print(summary(lm(df[,i]~x1+x2+x3+x4+x5+x6+x7+x8+x9+x10+x11+x12+x13+x14+x15+x16+x17+x18,data=df)))
}
KacZdr
  • 1,267
  • 3
  • 8
  • 23
  • thank you but it doesnt work. my df is called df_xy, and here is my diagnostic: Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'print': error in evaluating the argument 'object' in selecting a method for function 'summary': invalid type (list) for variable 'df_xy[, i]' . – lilgrass Oct 24 '22 at 08:01
  • Are you sure that df_xy is `data.frame`? Include in the question `dput(df_xy)`, to make it easier for others to help you - read https://stackoverflow.com/q/5963269/12382064. – KacZdr Oct 24 '22 at 09:51