0
$\begingroup$

I am wondering if there is a way to combine slopes/results from two separate linear regression analysis in R. I am not sure if meta-regression applies here or is there a package in R that will help me do this?

Thanks!!

linreg1 <- lm(BMI ~ PA + Stress, data=data1) 
linreg2 <- lm(BMI ~ PA + Stress, data=data2) 

Results

$\endgroup$
4
  • $\begingroup$ Please explain how the two datasets are related and what their sizes are (if known). $\endgroup$ – whuber May 3 at 20:49
  • $\begingroup$ The two dataset/cohorts have a similar sample (young adults), with sample 1 (n=400) and sample 2 (n=530), but since the ethnicity is different, it was recommended to run separate MLR on the two cohorts and then meta-analyze the results. $\endgroup$ – user13514792 May 4 at 13:23
  • $\begingroup$ OK. That raises an important question: in what sense do you want to "combine" the results, when they reflect potentially different fits for different ethnicities? $\endgroup$ – whuber May 4 at 14:12
  • 1
    $\begingroup$ If you want to go down the meta-analysis route then since you have multiple parameters in each model you need to investigate multi-level meta-analysis. You will need the variance covariance matrix of the estimates but since you have the data you can easily generate them. But as @whuber suggests it is a bit hard to see the point of averaging them if you believe they are different. $\endgroup$ – mdewey 2 days ago
0
$\begingroup$

One approach to estimate an "average" regression would be to do the following:

  • aggregate the data sets
  • create a dataset variable (coded 0 for data from the first dataset and 1 for data from the other data set)
  • run a multiple regression with the partial slopes you have here (PA & stress) and also run the model with the interaction of these two independent variables with the dataset variable

To proceed, you will need the p-values for the two interaction terms to be zero. If this happens, then you can run the model without the interaction terms, and you can report the "average" partial slopes from the model using the aggregated data set.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.