本文介绍了计算R中的实验设计的D效率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个实验设计.我想计算其D效率.我认为R包AlgDesign可以提供帮助.我发现函数optFederov可以生成设计,并且-如果用户需要-可以返回其D效率.但是,我不想使用optFederov生成设计-我已经有了我的设计!我尝试了eval.design(〜.,mydesign).但是它给我的唯一指标是:行列式,A,对角线和gmean.variances.也许有一种方法可以使行列式或A转换为D效率(我不是数学家,所以不确定).或者说可以使用其他方式手动"计算D效率?

I have an experimental design. I want to calculate its D-efficiency.I thought R package AlgDesign could help. I found function optFederov which generates the design and - if the user wants - returns its D efficiency. However, I don't want to use optFederov to generate the design - I already have my design!I tried eval.design(~.,mydesign). But the only metrics it gives me are: determinant, A, diagonality, and gmean.variances. Maybe there is a way to get from determinant or A to D-efficiency (I am not a mathematician, so I am not sure). Or maybe some other way to calculate D-efficiency "manually" so to say?

非常感谢任何提示!

推荐答案

我正在从事类似的项目.我在此链接.其中X是模型矩阵,p是线性模型中的beta数,ND是实验的运行次数.您可以编写这样的代码,它就能解决问题.

I was working on a similar project. I found out this formula Deff = (|X'X|^(1/p))/ND in this link. Where X is the model matrix, p is the number of betas in you linear model and ND the number of runs your experiment has. You could just make a code like this and it will do the trick.

det(t(X)%*%X)^(1/beta)/(numRuns)

我在项目中使用JMP测试了结果,因此我相信这是正确的公式

I tested the results using JMP for my project so I believe this is the correct formula

这篇关于计算R中的实验设计的D效率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 22:04