找回密码
 注册
查看: 1806|回复: 0

R语言:OME()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 17:47:36 | 显示全部楼层 |阅读模式
OME(MASS)
OME()所属R语言包:MASS

                                         Tests of Auditory Perception in Children with OME
                                         儿童中耳炎听觉测试

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Experiments were performed on children on their ability to differentiate a signal in broad-band noise. The noise was played from a pair of speakers and a signal was added to just one channel; the subject had to turn his/her head to the channel with the added signal. The signal was either coherent (the amplitude of the noise was increased for a period) or incoherent (independent noise was added for the same period to form the same increase in power).
儿童对自己的能力来区分宽带噪声信号进行了实验。从一对扬声器播放噪音和信号被添加到一个通道;主体不得不把他/她的头,以增加信号通道。信号是相干(噪声幅度上升一段时间)或语无伦次(独立噪声同期的形成在功率相同的增加添加)。

The threshold used in the original analysis was the stimulus loudness needs to get 75% correct responses. Some of the children had suffered from otitis media with effusion (OME).
在原来的分析中使用的门槛,刺激响度需要得到75%的正确反应。有些孩子遭受了来自积液性中耳炎(中耳炎)。


用法----------Usage----------


OME



格式----------Format----------

The OME data frame has 1129 rows and 7 columns:
OME数据框有1129行和7列:

Subject ID (1 to 99, with some IDs missing). A few subjects were measured at different ages.
科目编号(1到99的ID丢失与一些)。几个受试者在不同年龄段的测量。

"low" or "high" or "N/A" (at ages other than 30 and 60 months).
"low"或"high"或"N/A"(年龄超过30和60个月)。

Age of the subject (months).
主体的年龄(月)。

Loudness of stimulus, in decibels.
响度的刺激,在分贝。

Whether the signal in the stimulus was "coherent" or "incoherent".
无论是在刺激信号"coherent"或"incoherent"。

Number of correct responses from Trials trials.
数Trials试验的正确反应。

Number of trials performed.
进行的试验次数。


背景----------Background----------

The experiment was to study otitis media with effusion (OME), a very common childhood condition where the middle ear space, which is normally air-filled, becomes congested by a fluid.  There is a concomitant fluctuating, conductive hearing loss which can result in various language, cognitive and social deficits.  The term "binaural hearing" is used to describe the listening conditions in which the brain is processing information from both ears at the same time.  The brain computes differences in the intensity and/or timing of signals arriving at each ear which contributes to sound localisation and also to our ability to hear in background noise.
实验是研究性中耳炎与积液(OME),一个非常常见的儿童的情况下,中耳的空间,这是正常充气,成为流体拥挤。有伴随波动,传导性听力损失,这可能会导致在不同的语言,认知和社会赤字。双耳听力“一词是用来描述在大脑处理信息同时从两个耳朵听条件。脑计算的强度和/或定时信号到达每个耳朵,这有助于我们能够听到背景噪音的声音定位也不同。

Some years ago, it was found that children of 7–8 years with a history of significant OME had significantly worse binaural hearing than children without such a history, despite having equivalent sensitivity.  The question remained as to whether it was the timing, the duration, or the degree of severity of the otitis media episodes during critical periods, which affected later binaural hearing.  In an attempt to begin to answer this question, 95 children were monitored for the presence of effusion every month since birth.  On the basis of OME experience in their first two years, the test population was split into one group of high OME prevalence and one of low prevalence.
若干年前,有人发现,有7-8年的历史了显著中耳炎的儿童比没有这样的历史的儿童双耳听力显着恶化,尽管有等效感光度。问题依然存在,无论是时机,持续时间,或在关键时期,影响以后的双耳听力中耳炎图严重的程度。在开始回答这个问题的企图进行了监测,95名儿童每月积液存在自出生。中耳炎在他们的头两年经验的基础上,试验人群被分成一组高中耳炎患病率和发病率较低。


源----------Source----------

Sarah Hogan, Dept of Physiology, University of Oxford, via Dept of Statistics Consulting Service
萨拉·霍根,生理学系,牛津大学,通过统计咨询服务部


举例----------Examples----------


# Fit logistic curve from p = 0.5 to p = 1.0[符合Logistic曲线P = 0.5,P = 1.0]
fp1 <- deriv(~ 0.5 + 0.5/(1 + exp(-(x-L75)/scal)),
             c("L75", "scal"),
             function(x,L75,scal)NULL)
nls(Correct/Trials ~ fp1(Loud, L75, scal), data = OME,
    start = c(L75=45, scal=3))
nls(Correct/Trials ~ fp1(Loud, L75, scal),
    data = OME[OME$Noise == "coherent",],
    start=c(L75=45, scal=3))
nls(Correct/Trials ~ fp1(Loud, L75, scal),
    data = OME[OME$Noise == "incoherent",],
    start = c(L75=45, scal=3))

# individual fits for each experiment[个人适合每个实验]

aa <- factor(OME$Age)
ab <- 10*OME$ID + unclass(aa)
ac <- unclass(factor(ab))
OME$UID <- as.vector(ac)
OME$UIDn <- OME$UID + 0.1*(OME$Noise == "incoherent")
rm(aa, ab, ac)
OMEi <- OME

library(nlme)
fp2 <- deriv(~ 0.5 + 0.5/(1 + exp(-(x-L75)/2)),
            "L75", function(x,L75) NULL)
dec <- getOption("OutDec")
options(show.error.messages = FALSE, OutDec=".")
OMEi.nls <- nlsList(Correct/Trials ~ fp2(Loud, L75) | UIDn,
   data = OMEi, start = list(L75=45), control = list(maxiter=100))
options(show.error.messages = TRUE, OutDec=dec)
tmp <- sapply(OMEi.nls, function(X)
              {if(is.null(X)) NA else as.vector(coef(X))})
OMEif <- data.frame(UID = round(as.numeric((names(tmp)))),
         Noise = rep(c("coherent", "incoherent"), 110),
         L75 = as.vector(tmp), stringsAsFactors = TRUE)
OMEif$Age <- OME$Age[match(OMEif$UID, OME$UID)]
OMEif$OME <- OME$OME[match(OMEif$UID, OME$UID)]
OMEif <- OMEif[OMEif$L75 > 30,]
summary(lm(L75 ~ Noise/Age, data = OMEif, na.action = na.omit))
summary(lm(L75 ~ Noise/(Age + OME), data = OMEif,
           subset = (Age >= 30 &amp; Age <= 60),
           na.action = na.omit), cor = FALSE)

# Or fit by weighted least squares[或适合由加权最小二乘]
fpl75 <- deriv(~ sqrt(n)*(r/n - 0.5 - 0.5/(1 + exp(-(x-L75)/scal))),
               c("L75", "scal"),
               function(r,n,x,L75,scal) NULL)
nls(0 ~ fpl75(Correct, Trials, Loud, L75, scal),
    data = OME[OME$Noise == "coherent",],
    start = c(L75=45, scal=3))
nls(0 ~ fpl75(Correct, Trials, Loud, L75, scal),
    data = OME[OME$Noise == "incoherent",],
    start = c(L75=45, scal=3))

# Test to see if the curves shift with age[测试看看,如果曲线随着年龄的增长转向]
fpl75age <- deriv(~sqrt(n)*(r/n -  0.5 - 0.5/(1 +
                  exp(-(x-L75-slope*age)/scal))),
                  c("L75", "slope", "scal"),
                  function(r,n,x,age,L75,slope,scal) NULL)
OME.nls1 <-
nls(0 ~ fpl75age(Correct, Trials, Loud, Age, L75, slope, scal),
    data = OME[OME$Noise == "coherent",],
    start = c(L75=45, slope=0, scal=2))
sqrt(diag(vcov(OME.nls1)))

OME.nls2 <-
nls(0 ~ fpl75age(Correct, Trials, Loud, Age, L75, slope, scal),
    data = OME[OME$Noise == "incoherent",],
    start = c(L75=45, slope=0, scal=2))
sqrt(diag(vcov(OME.nls2)))

# Now allow random effects by using NLME[现在允许使用NLME随机效应]
OMEf <- OME[rep(1:nrow(OME), OME$Trials),]
OMEf$Resp <- with(OME, rep(rep(c(1,0), length(Trials)),
                          t(cbind(Correct, Trials-Correct))))
OMEf <- OMEf[, -match(c("Correct", "Trials"), names(OMEf))]

## Not run: ## this fails in R on some platforms[#不运行:#R中失败在某些平台上]
fp2 <- deriv(~ 0.5 + 0.5/(1 + exp(-(x-L75)/exp(lsc))),
             c("L75", "lsc"),
             function(x, L75, lsc) NULL)
G1.nlme <- nlme(Resp ~ fp2(Loud, L75, lsc),
     fixed = list(L75 ~ Age, lsc ~ 1),
     random = L75 + lsc ~ 1 | UID,
     data = OMEf[OMEf$Noise == "coherent",], method = "ML",
     start = list(fixed=c(L75=c(48.7, -0.03), lsc=0.24)), verbose = TRUE)
summary(G1.nlme)

G2.nlme <- nlme(Resp ~ fp2(Loud, L75, lsc),
     fixed = list(L75 ~ Age, lsc ~ 1),
     random = L75 + lsc ~ 1 | UID,
     data = OMEf[OMEf$Noise == "incoherent",], method="ML",
     start = list(fixed=c(L75=c(41.5, -0.1), lsc=0)), verbose = TRUE)
summary(G2.nlme)


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-23 06:09 , Processed in 0.025298 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表