楼主: seasonchan26
975 1

[学习分享] SAS BASE Dec 2016, North America [推广有奖]

  • 0关注
  • 0粉丝

小学生

85%

还不是VIP/贵宾

-

威望
0
论坛币
33 个
通用积分
0
学术水平
5 点
热心指数
6 点
信用等级
5 点
经验
119 点
帖子
7
精华
0
在线时间
3 小时
注册时间
2016-9-25
最后登录
2016-12-23

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
Before the test I went over Question 70 and Question 50 only, I found around 1/3 of the questions are not familiar.

/*1. Modified from Question 35*/

DATA two;
   INPUT x y;
   DATALINES;
5  2
3  1
5  6
;run;
PROC PRINT; RUN;
  data ONE  TWO  OTHER;
     set TWO;
     if X eq 5 then output ONE;
     if Y lt 5 then output TWO;
     /*original was simply "OUTPUT;"*/
     else if output;
  run;
title'one';
proc print data=one;run;
   title'two';
  proc print data=two;run;
title 'other';
  proc print data=other;run;

/*Asking the number of observations in each data sets. I got it wrong, but I think the correct answer
is: two obs in dataset one; two obs in dataset two*/

/*2. Modified from Question 46*/

DATA one;
   /*one blank value for one more indicator Revenue2007*/
   INPUT Revenue2007 Revenue2008 Revenue2009 Revenue2010;
   DATALINES;
   
. 1.2 1.6 2.0
;
;run;
proc print;run;
data WORK.TWO;
     set WORK.ONE;
     Total=mean(of Rev:);
  run;
  proc print;run;
  
  /*The value of total should be 1.6*/
  
  
/*3. Another question asking to calculate the total of three quarter's values using arrays

keypoint: http://support.sas.com/kb/41/380.html

using * to refer to all elements in the array
   _sum_ = sum(of array_name
  • );  

      _avg_ = mean(of array_name
  • );  */
      
      /*4. Proc Means calculates the average of
      "all non-missing numeric"
      "all missing and non-missing numeric"
      "all non-missing numeric and numbers stored as characters"
      "all missing and non-missing numeric and numbers stored as characters"
      
      I chose the 1st one, hoping it's right

  • 二维码

    扫码加我 拉你入群

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

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

    关键词:SAS base America Erica North Base familiar original around title

    沙发
    lilian1222 发表于 2016-12-20 03:18:32 |只看作者 |坛友微信交流群
    赞赞人品!

    使用道具

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

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

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

    GMT+8, 2024-4-26 11:03