This App can be used to fit a linear model for data collected in groups. A mixed effects model consists of fixed effects and random effects. Fixed effects are conventional linear regression. Random effects have linear coefficients that vary with respect to one or more grouping variables.
Download the file "lmm.opx", and then drag-and-drop onto the Origin workspace. An icon will appear in the Apps gallery window.
- Activate a worksheet with data and click the icon in the Apps Gallery window to open the dialog.
- In the Input tab, select a column as Dependent Variable. Select one or multiple columns for Continuous and Categorical Independent Variables. If Categorical data is chosen, Reference Factor Level for each column can be specified.
Note: You can specify one or two subject variables (grouping variables). If two subject variables are specified, the 1st subject variable is considered to be nested within the 2nd subject variable.
- In the Settings tab, Model Type provides two options: Main Effects and Custom Model.
If Custom Model is chosen, you can add any main effects and interaction terms to the model in the opened dialog. You can also modify the model by clicking the button on the right of Model box. You need to select models for both Fixed Effects and Random Effects. Include Intercept option specifies whether to include the intercept parameter in the regression. Modify Accuracy option if fitting fails to reach required accuracy.
- In the Quantities tab, select quantities to output in the report sheet.
- In Plots tab, specify whether to create Fitted Plot and Residual Plot.
- Click OK button.
Sample OPJU File
This app provides a sample OPJU file. Right click the App icon in the Apps Gallery window, and choose Show Samples Folder from the short-cut menu. A folder will open. Drag-and-drop the project file LinearMixedEffects Sample.opju from the folder onto Origin. The Notes window in the project shows detailed steps.
Note: If you wish to save the OPJU after changing, it is recommended that you save to a different folder location (e.g. User Files Folder).