缺失数据的数据集的最小二乘均值

发布于 2024-10-10 22:35:12 字数 414 浏览 9 评论 0原文

我正在写一些关于 R 的帮助。

我正在使用以下脚本进行简单的 RCBD 分析 比较基因型(名称) 对于特征“X”。

library(stats)
data_1=read.table(file="test.txt", head=TRUE)
result_X =aov(X~Block+Name, data=data_1)
sink("result_X.txt")
summary(result_X)
sink()

我的数据缺少数据(“NA”)。所以,计算完LSD后, 我想比较一下 基因型按降序排列。我不认为平均数 很好,因为有些 某些“名称”的“块”丢失。

所以,问题是,打印出“最少”的脚本是什么? 平方的意思是',我 我认为与 LSD 进行比较比简单平均值是最好的。 谢谢你的帮助,

奥斯瓦尔德

I am writing for some help in R.

I am doing a simple RCBD analysis using the following script to
compare genotypes (Name)
for the trait "X".

library(stats)
data_1=read.table(file="test.txt", head=TRUE)
result_X =aov(X~Block+Name, data=data_1)
sink("result_X.txt")
summary(result_X)
sink()

My data has missing data ("NA"). So, after calculating the LSD,
I would like to compare
the genotypes in descending order. I do not think the averages
are good since some
'blocks' for some 'names' are missing.

So, the question is, what is the script to print out the 'least
square means', which I
think are the best to compare with LSD than simple averages.
Thank you for your help,

Oswald

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不疑不惑不回忆 2024-10-17 22:35:12

考虑一下函数 na.omit,它可以过滤掉包含 NA 的数据行。

Consider the function na.omit, which can filter out rows of data which contain NA.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文