# Confused: Mixed model, step-wise regression, testing for random effects

#### Deccantraps

##### New Member
Dear all,

I want to perform a MLR (mixed model) on a data set (details below) that has both numeric and categorical explanatory variables. The data is as below:

Sample number: 85

Response variable: Y (numeric)

Explanatory variables:

Sr.No. Variable Levels
X1 Principal component 1 for a dataset Numeric
X2 Principal component 2 for a dataset Numeric
X3 Region 4
X4 Class 3
X5 Block 9
X6 Year 5
X7 Age numeric
X8 Age 3
X9 Duration 8
X10 Depth 5
X11 Option 2
X12 Seeds weight numeric
X13 Seeds proportion numeric

This will remain a mixed model, although some of the 13 variables may not be used in the final analysis.

Aim: Investigate the effect/influence of 13 variables on Y. However the focus needs to be on X1 and X2, which are the variables of interest.

My present understanding is I should use step-wise regression (direction=both) to identify which of the variables are significant. Then I should do a MLR to include the interaction effects as well.

However, I referred to online resources, books and articles to know what should be the best approach and how to interpret results. I got confused reading about step-wise regression (direction), treating categorical variables as random effects, lm or glm and am not sure what should be the best approach.

Can you please suggest which is the most appropriate for this data and aim?
If my current approach is right, how to decide the order of variables for categorical variables in step-wise regression? How to handle categorical variables for formulating the prediction equation? I get 'NA' for coefficients for some levels/variables (possibly because of higher predictor to samples ratio) - can these 'NA's be ignored or is there a solution to fix this?

I will be thankful to you if you can please post some links to online resources that are very clear and easy to understand.

Thanks again!