楼主: windren_0
2479 0

[问答] 多层次分析的一个基础题目,求指导 [推广有奖]

  • 0关注
  • 0粉丝

已卖:1份资源

初中生

33%

还不是VIP/贵宾

-

威望
0
论坛币
1294 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
116 点
帖子
5
精华
0
在线时间
17 小时
注册时间
2009-11-2
最后登录
2022-2-1

楼主
windren_0 发表于 2016-3-31 22:31:17 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
一套数据出的三套题目,一点头绪都没有,目前只做出了第一大题第一小题……部分原因是英语太差……求高手指导……至少给点,思路,谢谢。数据已经附件上传

第一大题我试着写了下, 可是后两个小题一直报错……
####################Chapter11 exercise4(1)###################
allvar <- read.csv("H:/software/RStudio/files/allvar.csv")
HIV<-na.omit(allvar);
HIV;
time<-HIV$visage-HIV$baseage
HIV<-cbind(HIV,time);
for (i in 1:4) {plot(time[HIV$newpid==i],HIV$CD4PCT[HIV$newpid==i],xlab="time",ylab="CD4 percentage",type ="b")
  }

####################Chapter11 exercise4(2)###################
child<-0
MAX<-max(HIV$newpid);
for (i in 1:MAX){child<-lm(HIV$CD4PCT[HIV$newpid==i]~HIV$time[HIV$newpid==i])
}
child1<-lm(HIV$CD4PCT[HIV$newpid==1]~HIV$time[HIV$newpid==1]);
child2<-lm(HIV$CD4PCT[HIV$newpid==2]~HIV$time[HIV$newpid==2]);
child1
####################Chapter11 exercise4(3)###################
#step1
treatment<-0
for (i in 1:MAX) {treatment<-lm(HIV$CD4PCT[HIV$newpid==i]~HIV$treatmnt[HIV$newpid==i]+HIV$visage[HIV$newpid==i]}

11.7
The folder cd4 has CD4 percentages for a set of young children with HIV who
were measured several times over a period of two years. The dataset also includes
the ages of the children at each measurement.
(a) Graph the outcome (the CD4 percentage, on the square root scale) for each
child as a function of time.
(b) Each child’s data has a time course that can be summarized by a linear fit.
Estimate these lines and plot them for all the children.
(c) Set up a model for the children’s slopes and intercepts as a function of
the treatment and age at baseline. Estimate this model using the two-step
procedure–first estimate the intercept and slope separately for each child, then
fit the between-child models using the point estimates from the first step.
12.2
(a) Write a model predicting CD4 percentage as a function of time with varying
intercepts across children. Fit using lmer() and interpret the coefficient for
time.
(b) Extend the model in (a) to include child-level predictors (that is, group-level
predictors) for treatment and age at baseline. Fit using lmer() and interpret
the coefficients on time, treatment, and age at baseline.
(c) Investigate the change in partial pooling from (a) to (b) both graphically and
numerically.
(d) Compare results in (b) to those obtained in part (c).
13.4
(a) Extend the model in Exercise 12.2 to allow for varying slopes for the time
predictor.
(b) Next fit a model that does not allow for varying slopes but does allow for
different coefficients for each time point (rather than fitting the linear trend).
(c) Compare the results of these models both numerically and graphically.


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:层次分析 求指导 基础题 多层次 exercise 英语

allvar.rar
下载链接: https://bbs.pinggu.org/a-2003396.html

17.47 KB

本附件包括:

  • allvar.csv

allvar.xlsx

70.14 KB

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-25 03:14