缺失数据的数据集的最小二乘均值
我正在写一些关于 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
考虑一下函数
na.omit
,它可以过滤掉包含NA
的数据行。Consider the function
na.omit
, which can filter out rows of data which containNA
.