Navigate to the folder containing the sample data. Load the sample data.
This simulated data is from a manufacturing company that operates 50 factories across the world, with each factory running a batch process to create a finished product. The company wants to decrease the number of defects in each batch, so it developed a new manufacturing process. To test the effectiveness of the new process, the company selected 20 of its factories at random to participate in an experiment: Ten factories implemented the new process, while the other ten continued to run the old process. In each of the 20 factories, the company ran five batches (for a total of 100 batches) and recorded the following data:
Flag to indicate whether the batch used the new process (newprocess.
)
处理时间为每批次,以小时为单位(时间
)
温度批量,以摄氏度(temp
)
Categorical variable indicating the supplier (A
,B
, orC
) of the chemical used in the batch (供应商
)
Number of defects in the batch (缺陷
)
数据还包括time_dev.
andtemp_dev
,这分别从20摄氏度为3小时的过程标准来表示时间和温度的绝对偏差。
使用广义的线性混合效果模型使用newprocess.
,time_dev.
,temp_dev
, 和供应商
as fixed-effects predictors. Include a random-effects term for intercept grouped byfactory
, to account for quality differences that might exist due to factory-specific variations. The response variable缺陷
has a Poisson distribution, and the appropriate link function for this model is log. Use the Laplace fit method to estimate the coefficients. Specify the dummy variable encoding as'效果'
,使虚拟变量系数总和为0。
The number of defects can be modeled using a Poisson distribution
This corresponds to the generalized linear mixed-effects model
where
GLME =广义线性混合效果模型适合ML型号信息:观测数量100固定效果系数6随机效果系数20协方差参数1分布泊松链路Log Fitmethod Laplace公式:缺陷〜1 + NewProcess + Time_Dev + Temp_dev +供应商+(1 |工厂)型号拟合统计:AIC BIC loglikelihiale Deviance 416.35 434.58 -201.17 402.35固定效果系数(95%CIS):名称估计SE TSTAT DF PVALUE'1.4689 0.15988 9.1875 94 9.8194E-15'NewProcess'-0.36766'newprocess'-0.367660.17755 -2.0708 94 0.041122 'time_dev' -0.094521 0.82849 -0.11409 94 0.90941 'temp_dev' -0.28317 0.9617 -0.29444 94 0.76907 'supplier_C' -0.071868 0.078024 -0.9211 94 0.35936 'supplier_B' 0.071072 0.07739 0.91836 94 0.36078下限上限1.1515 1.7864 -0.72019 -0.015134 -1.7395 1.5505 -2.1926 1.6263 -22679 0.083051 -0.082588 0.22473随机效果协方差参数:组:工厂(20级)Name1 Name2型估计'(拦截)''(拦截)''std'0.31381组:错误名称估计'SQRT(Dispersion)'1
Perform an- 确定所有固定效果系数是否等于0。
统计=边际测试:方差分析DFMETHOD = '残余' Term FStat DF1 DF2 pValue '(Intercept)' 84.41 1 94 9.8194e-15 'newprocess' 4.2881 1 94 0.041122 'time_dev' 0.013016 1 94 0.90941 'temp_dev' 0.086696 1 94 0.76907 'supplier' 0.59212 2 94 0.5552
The-values for the intercept,newprocess.
,time_dev.
, 和temp_dev
are the same as in the coefficient table of the格林
DISP.lay. The small- 拦截和拦截和newprocess.
表明这些是5%重要水平的重要预测因子。大-values fortime_dev.
andtemp_dev
indicate that these are not significant predictors at this level.
The- 0.5552的值为供应商
测量代表分类变量的两个系数的组合意义供应商
。This includes the dummy variables供应商_C.
and供应商_B.
as shown in the coefficient table of the格林
DISP.lay. The large-value indicates that供应商
is not a significant predictor at the 5% significance level.