楼主: wuhaofeng123
3032 2

[问答] 如何对纵向数据画图 [推广有奖]

  • 0关注
  • 3粉丝

博士生

93%

还不是VIP/贵宾

-

威望
0
论坛币
36 个
通用积分
7.3000
学术水平
0 点
热心指数
2 点
信用等级
2 点
经验
506 点
帖子
191
精华
0
在线时间
433 小时
注册时间
2011-9-30
最后登录
2025-9-24

楼主
wuhaofeng123 发表于 2013-3-26 01:46:21 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
请问一下各位大神:
   现在对42个人进行了长期观察,每个人观察了120次,一共有一个因变量,16个自变量,现在我想用线性随机效应混合模型进行分析,这里面我想找一下这些自变量中那些是随机部分,于是想用一个pairs其中一个自变量与因变量的散点图,请问我如何能将这42个人分别取出来每一个画一个二维图,然后将这42个进行比较,判断是否存在个体的随机效应。
二维码

扫码加我 拉你入群

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

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

关键词:纵向数据 Pairs 一个因变量 随机效应 混合模型 散点图 因变量 自变量 如何 模型

怕,你就输一辈子

沙发
trier2006 发表于 2013-3-26 10:27:22
直接在回归模型中纳入所有自变量就行了吧,还需要每个自变量逐一和因变量画图?这个不了解。
最好的医生是自己,最好的药物是时间……

藤椅
DM小菜鸟 发表于 2015-1-9 15:45:48
pairs(iris[-5], log = "xy") # plot all variables on log scale
pairs(iris, log = 1:4, # log the first four
      main = "Lengths and Widths in [log]", line.main=1.5, oma=c(2,2,3,2))
  
或者coplot例子:
  
## Tonga Trench Earthquakes
coplot(lat ~ long | depth, data = quakes)
given.depth <- co.intervals(quakes$depth, number = 4, overlap = .1)
coplot(lat ~ long | depth, data = quakes, given.v = given.depth, rows = 1)


## Conditioning on 2 variables:
ll.dm <- lat ~ long | depth * mag
coplot(ll.dm, data = quakes)
coplot(ll.dm, data = quakes, number = c(4, 7), show.given = c(TRUE, FALSE))
coplot(ll.dm, data = quakes, number = c(3, 7),
       overlap = c(-.5, .1)) # negative overlap DROPS values
  
## given two factors
Index <- seq(length = nrow(warpbreaks)) # to get nicer default labels
coplot(breaks ~ Index | wool * tension, data = warpbreaks,
       show.given = 0:1)
coplot(breaks ~ Index | wool * tension, data = warpbreaks,
       col = "red", bg = "pink", pch = 21,
       bar.bg = c(fac = "light blue"))
  
## Example with empty panels:
with(data.frame(state.x77), {
  coplot(Life.Exp ~ Income | Illiteracy * state.region, number = 3,
         panel = function(x, y, ...) panel.smooth(x, y, span = .8, ...))
  ## y ~ factor -- not really sensible, but 'show off':
  coplot(Life.Exp ~ state.region | Income * state.division,
         panel = panel.smooth)
})

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

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