In my dataset I have one independent variable (x) and am trying to determine if knowledge of X can be used to predict the value of any several thousand other dependent variables (Y1, Y2, ...., Y1000).
Is there a simple way to automatically perform single linear (or nonlinear) regression for all of the independent variables simultaneously?
Additionally, would it be possible to create a a table with summaries for the correlation coefficients, F and P values,AIC, etc..., instead of having to calculate the data for each comparison individual comparison (X vs Y1, X vs Y2, etc...)?
lapply
. The output will be a list of models that can be passed intomodelsummary()
which will produce a nice table of all relevant statistics. $\endgroup$sur
fromsystemfit
package. Seemingly unrelated regression might also fit your requirement. $\endgroup$