# displme


显示线性混合效应模型

函数库: TyMachineLearning

# 语法

displme(lme)

# 说明

displme(lme) 返回混合模型的参数属性概括。

# 示例

拟合线性混合效应模型
加载数据集,该数据中 lasdata_x 大小为 205×3,其中每行表示每一个观测值,3 列特征变量分别表示为 Horsepower、CityMPG、EngineType。
using CSV
using TyMachineLearning
using DataFrames
file1 = joinpath(pkgdir(TyMachineLearning), "data/Regression/MXL_data.csv")
lasdata_x = CSV.read(file1, DataFrame; header=1)
formula = "CityMPG~Horsepower"
group = "EngineType"
lme = fitlme(lasdata_x, formula, group)

打印线性混合效应模型的相关参数及属性。

displme(lme)
Linear mixed-effects model fit by ML

Model information:
 Number of observations: 203
 Fixed effects coefficients: 2
 Raondom effects coefficients: 7
 Covariance parameters coefficients: 1

Model fit statistics:
 AIC  BIC  LogLikelihood  Deviance 
───────────────────────────────────
 NaN  NaN       -560.923   1121.85

Fixed effects coefficients (95% CIs):
 Name        Estimate   SE          tStat     pValue       Lower   Upper  
──────────────────────────────────────────────────────────────────────────
 Intercept   41.482     2.94195     14.1002   3.78856e-45  35.716  47.248
 Horsepower  -0.145257  0.00832434  -17.4497  3.4615e-68   -0.162  -0.129

Random effects covariance parameters (95% CIs):
 Names      Estimate  SE    
────────────────────────────
 Group Var  46.914    9.744

上表反映了模型拟合的相关信息以及系数估计。

# 输入参数

lme - 线性混合模型
对象
训练好的线性混合模型

数据类型: 对象

# 另请参阅

fitglm | fitcecoc