Preview

Sas If Then Else

Good Essays
Open Document
Open Document
1347 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Sas If Then Else
Using IF THEN ELSE statements, LENGTH is to be use so that the new coloum create (Patient) will have defined length that is $12.

data newclass; set sashelp.class; length Patient $12.;
If weight <=84 then Patient= 'UnderWeight '; else
If weight >84 and weight <=100 then Patient= 'ProperWeight '; else
If weight >100 then Patient= 'OverWeight '; else
Patient= 'OutLier '; run;

======================================================================
SELECT WHEN END statement can also be use in place of IF THEN ELSE statement.
LENGTH is to be use so that the new coloum create (Patient) will have defined length that is $12.

data newclass; set sashelp.class (keep= name weight); Length Grade $12.;
Select;
when (weight <=84) Grade= 'Lower '; when (weight >84 and weight <=100) Grade= 'Medium '; when (weight >100) Grade = 'Highest '; otherwise Grade = 'NA '; end;
-------------------------------------------------
run;

data Cars_New; set sashelp.cars (keep= Make MSRP);
Length sales $14.; select; when (MSRP <=10500) sales= 'Lowest '; when (MSRP > 10500 and MSRP <= 18000) sales= 'Medium '; when (MSRP > 18000) sales = 'Heighest '; otherwise sales= 'outlier ';
End;
run;
===================================================================================
To create more then one dataset from one dataset

data Cars_SUV Cars_SEDAN Cars_OTHERS; set sashelp.cars ;
If Type = 'SUV ' then output Cars_SUV; else
If Type = 'Sedan ' then output Cars_SEDAN; else output Cars_OTHERS;
RUN;

RETAIN Statement: It initialize a value to a variable Do Loops; Leave Data detail; do var= 1 to 10; if var=7 then leave; (Leave will tel progm to stop when reach Var=7) else; output; end; run; Do Loops; continue Data detail;
Do var= 1 to 15; if var= 8 then continue; (Continue will tel program to continue when Var=7) else; output; end; run;

Do Until: until

You May Also Find These Documents Helpful

  • Satisfactory Essays

    This new floor plan for the clinic does not have designated office space for all the physicians and the medical assistants. The idea is that there is not any grounding space for the medical staff to stop and gather but to continue to offer constant and…

    • 607 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Now according to figure 3 in order for the clinic to pay for the marketing plan it would need to have 22 consecutive days in operation seeing 73 patients per day.…

    • 964 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    A cost- cutting option that was selected was reducing agency staff and length of stay of patients. With this option patient care would be affected slightly. The hospital would be able to save more money by reducing agency staffing, because they get paid twice as much as regular employees. And if patients are discharged early the hospital would still get paid the same if he or she stayed the prearranged time. When the…

    • 514 Words
    • 3 Pages
    Satisfactory Essays
  • Better Essays

    Castor Collins Vice President Mary Mulanax has been asked to come up with a strategy and financial plan for the corporation. The duties she is faced with is setting pricing plans and insurance premiums for companies and their work force. During this time Castor Collins has been approached by two different companies looking to get insurance for their work force. The companies have a set rate for employees and set premium as well since the employees will be paying for their own insurance (College, 2006). The company seeking insurance for their employees are Constructit and E-Editors. Constructit has 1,000 people in their company and E-Editors has 1,600 people within the company. So each company has set premiums, Constructit has a 4,000 dollar max and E-Editors has a 4,500 dollar max. The company I chose to look at is Constructit has to decide between the three plans, which are Castor Standard, Castor Enhanced and Castor Enhanced Minor which is a customized plan.…

    • 1122 Words
    • 5 Pages
    Better Essays
  • Good Essays

    Nt1330 Unit 9 Final Paper

    • 1263 Words
    • 6 Pages

    Look at the patient arrival rates and compare them to the available MD and NP capacity. An hour-by-hour or day-by-day analysis will show some interesting patterns. Based on what you have learned about waiting lines and utilization, comment on the current assignment fitness between supply and demand?…

    • 1263 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    Hiredate DATE No No Job VARCHAR2(15) No No Mgrno number(4) no no yes ( to emp.empno) Salary number(8,2) no no Comm number(8,2) no no Deptno number(2) no no yes ( to…

    • 1169 Words
    • 5 Pages
    Satisfactory Essays
  • Better Essays

    The simulation in question deals with the Elijah Heart Center in New York State. The simulation covers three very distinction aspects of healthcare financial decisions that an administrator may have to make. First, a capital shortage and cost cutting techniques are delved into. What techniques can be employed that will provide adequate savings without significantly affecting the quality of care afforded to each patient? Next, the most cost effective equipment selections will be explored. What equipment should be bought; what equipment should be leased? Finally, there is a peak at the various funding methods available. What method is the best option for the long term of the organization?…

    • 1066 Words
    • 5 Pages
    Better Essays
  • Powerful Essays

    HC491 Week 3 Homework

    • 508 Words
    • 3 Pages

    An institution needs to measure input and output to effectively staff the facility. Input can be measured by patient arrivals and appointment requests (request for care). Output can be measured by patients treated, cost per case, quality and access. The physician organization also assists in providing excellent care by recruiting and retaining physicians necessary to provide this care. Physician supply should remain open to leave and come as the community demand raises and lowers. However, it is more effective to be strategic in planning the staffing needs. Too big leaves physicians underworked. Too small leaves physicians­­ overworked. A medical staff plan should…

    • 508 Words
    • 3 Pages
    Powerful Essays
  • Good Essays

    In this simulation, you are presented with two potential customers: Constructit and E-editors. Each company is willing to pay a different premium for insurance coverage, and each company has a unique employee profile for health care risks. Your job is to determine what health care plan would best provide services and cover costs. Remember, at the end of the simulation, you may decide to deny coverage to either or both companies.…

    • 627 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    2. Analyze the available MD and NP capacity. How effective is the clinic in matching supply and demand?…

    • 656 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    2.) Develop a similar table to show the effects of adding operations on Saturday. How would this affect the utilization of the bed capacity? Is this capacity sufficient for the additional patients?…

    • 1548 Words
    • 7 Pages
    Good Essays
  • Good Essays

    Shouldice Hospital Case

    • 464 Words
    • 2 Pages

    Bottleneck analysis: Also see enclosed Process flow chart (Appendix 1). Hospital is able to perform 42 exams/afternoon and send 38 patients to the operation rooms. But surgery capacity is 33 operations/day only. Bottleneck (number of operations/day) is therefore located between these two processes. Hospital performs 33 operations/day = demand 116 beds/Wed,Thu and 99 beds/Tue. Demand is 116 and current capacity is 89. Bottleneck is the number of beds available. It is necessary to increase capacity by (116-89)/89 = 30% just to meet current schedule of surgeries. Currently there are 30 – 36 operations performed daily = 33 for an average. 4*5 = 20 in the morning and 13 in the afternoon (assuming that time slot will last ca. 50 minutes). Here is an opportunity for improvement. Each of normal operations takes 1 hour and there are 5 hours available during the morning => increase 1 operation / room which represents total of 5 operations across 5 operating rooms per day. During afternoon is no improvement possible. It results in increasing of capacity for a total 38 / day (25 each morning and 13 each afternoon). When scheduled for 5 day week, it requires 133 rooms available for peak days of the week (Wed and Thu). The new need represents 50% increase in capacity compared to the current capacity of 89 rooms. Recommendation: Hospital should invest 4 million dollars in the new space, which will increase bed capacity by 50% and will require perform Saturday surgeries as well. Capacity of beds will increase 89*(1 + 50%) = 133. It exceeds number of beds needed at the time (116), therefore eliminate the bed capacity bottleneck. With 133 beds it is possible to accommodate 38 new patients / day, thus 38 operations can be performed per day. Daily examination capacity, daily operation capacity and number of beds available corresponds without any troubles => no individual bottleneck.…

    • 464 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Just for Now

    • 268 Words
    • 2 Pages

    Following the end of your financial policy, add a separate section reviewing why you believe your policy is best suited to your selected type of medical office setting. Explain and provide support for your rationale in 550 to 700 words. Use a minimum of one reference to support your explanation and format your paper according to APA guidelines. You may use the same reference(s) to complete the supporting rationale that you used for the financial policy.…

    • 268 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Chapter Chapter 12 Autoregressive Conditional Heteroscedasticity (ARCH) and Generalized ARCH (GARCH) Models Section Section 12.1 Introduction ARCH and GARCH Models • ARCH and GARCH models are designed to model heteroscedasticity (unequal variance) of the error term with the use of timeseries data • Objective is to model and forecast volatility Example: Understand the risk of holding an asset; useful in financial situations • ARCH -- Autoregressive Conditional Heteroscedasticity • GARCH -- Generalized ARCH Engle, R. “Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of UK Inflation,” Econometrica 50 (1982):987-1008. Engle noticed that in some time series, particularly those involving financial data, large and small residuals tend to come in clusters, suggesting that the variance of an error may depend on the size of the preceding error.…

    • 1109 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    Lean Leadership

    • 890 Words
    • 4 Pages

    This tool work so well because a hospital with 800 beds that cuts average length by just 10% can free up nearly 80 beds per year, enabling the delivery of more than 4000 additional procedures and boosting operating profit by almost $30 million.…

    • 890 Words
    • 4 Pages
    Good Essays

Related Topics