Course Hero Logo

Count the number of missing values for the variables

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 132 - 135 out of 513 pages.

Count the number of missing values for the variables A, B, and C in the Missing data set. Add thecumulative number of missing values to each observation (use variable names MissA, MissB, andMissC). Use the MISSING function to test for the missing values.5.Create and print a data set with variables N and LogN, where LogN is the natural log of N (thefunction is LOG). Use a DO loop to create a table showing values of N and LogN for values of Ngoing from1to20.6.Repeat Problem 5, except have the range of N go from5to100by5.
Chapter 8: Performing Iterative Processing: Looping1197.Use an iterative DO loop to plot the following equation:y = 3*x25*x+ 10Use values ofxfrom 0 to 10, with an increment of .10. Use the code below to display the resultingequation.title "Problem 7";proc sgplot data=plotit;series x=x y=y;run;8.Use an iterative DO loop to plot the following equation:Logit = log(p / (1 – p))Use values ofpfrom0to1(with a point at every .05). Using the following PROC SGPLOTstatements will produce a very nice plot.title "Logit Plot";proc sgplot data = Logitplot;series x=p y=Logit;run;9.You have the following seven values for temperatures for each day of the week, starting withMonday: 70, 72, 74, 76, 77, 78, and 85. Create a temporary SAS data set (Temperatures) with avariable (Day) equal toMon,Tue,Wed,Thu,Fri,Sat, andSunand a variable calledTempequalto the listed temperature values. Use a DO loop to create the Day variable.10.You are testing three speed-reading methods (A, B, and C) by randomly assigning 10 subjects toeach of the three methods. You are given the results as three lines of reading speeds, each linerepresenting the results from each of the three methods, respectively. Here are the results:250 255 256 300 244 268 301 322 256 333267 275 256 320 250 340 345 290 280 300350 350 340 290 377 401 380 310 299 399Create a temporary SAS data set from these three lines of data. Each observation should containMethod (A, B, or C), and Score. There should be 30 observations in this data set. Use a DO loopto create the Method variable and remember to use a single trailing @ in your INPUT statement.Provide a listing of this data set using PROC PRINT.11.You have daily temperatures for each hour of the day for two cities (Dallas and Houston). The 48temperature values are strung out in several lines like this:80 81 82 83 84 84 87 88 89 8991 93 93 95 96 97 99 95 92 90 8886 84 80 78 76 77 7880 81 82 82 8688 90 92 92 93 96 94 92 9088 84 82 78 76 74The first 24 values represent temperatures from Hour 1 to Hour 24 for Dallas and the next 24values represent temperatures for Hour 1 to Hour 24 for Austin. Using the appropriate DO loops,create a data set (Temperature) with 48 observations, each observation containing the variablesCity, Hour, and Temp.
120Learning SAS by Example: A Programmer’s Guide, Second EditionNote:For this problem, you will need to use a single trailing @ on your INPUT statement (seeChapter 21, Section 21.11 for an explanation).

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 513 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A
Tags
Test, Bankruptcy in the United States

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture