楼主: lichangzai1226
4822 1

proc nlmixed 过程出现 ERROR: Variable not found是什么问题呢 谢谢! [推广有奖]

  • 0关注
  • 0粉丝

小学生

78%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
54 点
帖子
9
精华
0
在线时间
9 小时
注册时间
2012-11-8
最后登录
2013-3-29

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
data WORK.SCHUETZ                                 ;350      %let _EFIERR_ = 0; /* set the ERROR detection macro variable */351      infile 'd:\myfile\schuetz.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;352         informat Test $4. ;353         informat Study_ID $18. ;354         informat tp best32. ;355         informat fp best32. ;356         informat fn best32. ;357         informat tn best32. ;358         informat Indirect best32. ;359         format Test $4. ;360         format Study_ID $18. ;361         format tp best12. ;362         format fp best12. ;363         format fn best12. ;364         format tn best12. ;365         format Indirect best12. ;366      input367                  Test $368                  Study_ID $369                  tp370                  fp371                  fn372                  tn373                  Indirect374      ;375      if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */376      run;
NOTE: The infile 'd:\myfile\schuetz.csv' is:      Filename=d:\myfile\schuetz.csv,      RECFM=V,LRECL=32767,File Size (bytes)=3190,      Last Modified=23Dec2010:15:34:36,      Create Time=19Nov2008:16:46:13
NOTE: 108 records were read from the infile 'd:\myfile\schuetz.csv'.      The minimum record length was 23.      The maximum record length was 33.NOTE: The data set WORK.SCHUETZ has 108 observations and 7 variables.NOTE: DATA statement used (Total process time):      real time           0.03 seconds      cpu time            0.01 seconds

108 rows created in WORK.SCHUETZ                              from d:\myfile\schuetz.csv.


NOTE: WORK.SCHUETZ data set was successfully created.NOTE: PROCEDURE IMPORT used (Total process time):      real time           0.10 seconds      cpu time            0.09 seconds

377    data schuetz;378    set schuetz;379    if test ="CT"  then testtype=1;380    sens=1; spec=0; true=tp; n=tp+fn; output;381    sens=0; spec=1; true=tn; n=tn+fp; output;382    run;
NOTE: There were 108 observations read from the data set WORK.SCHUETZ.NOTE: The data set WORK.SCHUETZ has 216 observations and 12 variables.NOTE: DATA statement used (Total process time):      real time           0.00 seconds      cpu time            0.00 seconds

383    proc sort data=schuetz;384    by study_id test;385    run;
NOTE: There were 216 observations read from the data set WORK.SCHUETZ.NOTE: The data set WORK.SCHUETZ has 216 observations and 12 variables.NOTE: PROCEDURE SORT used (Total process time):      real time           0.01 seconds      cpu time            0.01 seconds

386    proc nlmixed data=schuetz cov ecov;387  parms msens=2 mspec=1 s2usens=0 s2uspec=0 covsesp=0;388  logitp=(msens+usens)*sens+(mspec+uspec)*spec;389  p = exp(logitp)/(1+exp(logitp));390  model true ~ binomial(n,p);391  random usens uspec ~ normal([0,0],[s2usens,covsesp,s2uspec]) subject=sudy_id  out=randeffs;ERROR: Variable SUDY_ID not found.
NOTE: The data set WORK.RANDEFFS has 0 observations and 0 variables.WARNING: Data set WORK.RANDEFFS was not replaced because new file is incomplete.NOTE: PROCEDURE NLMIXED used (Total process time):      real time           0.10 seconds      cpu time            0.01 seconds

392  proc print;393  run;
下面是编辑内容:
proc import out=schuetz
datafile="d:\myfile\schuetz.csv"
dbms=csv
  replace;
  getnames=yes;
  run;
  data schuetz;
  set schuetz;
  if test ="CT"  then testtype=1;
  sens=1; spec=0; true=tp; n=tp+fn; output;
  sens=0; spec=1; true=tn; n=tn+fp; output;
  run;
  proc sort data=schuetz;
  by study_id test;
  run;
  proc nlmixed data=schuetz cov ecov;
parms msens=2 mspec=1 s2usens=0 s2uspec=0 covsesp=0;
logitp=(msens+usens)*sens+(mspec+uspec)*spec;
p = exp(logitp)/(1+exp(logitp));
model true ~ binomial(n,p);
random usens uspec ~ normal([0,0],[s2usens,covsesp,s2uspec]) subject=sudy_id  out=randeffs;
proc print;
run;





二维码

扫码加我 拉你入群

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

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

关键词:Variable nlmixed Mixed Error found 350 ERROR

请将问题的重点给列出来
这样看来比较凌乱

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-11-5 22:08