I have a y variable that contains 160 000 collums that I am going to use in mediator analysis. How can I speed thing up? Is it possible to use vectorisation like in numpy? Where I can use these commands,

'''

model.0=lm(ydata ~ vlbw)

summary(model.0)

model.M = lm(iq ~ vlbw)

summary(model.M)

model.Y=lm(ydata ~ vlbw + iq)

results = mediate(model.M,model.Y,treat = 'vlbw',mediator = 'iq',boot = T,sims=500)

coefs=extract_mediation_summary(summary(results))

p[vector]=coefs[1,4]

'''

Where I plug in the entire y variable as depend variable? What data format can I use for y?