ࡱ> #%"'` l.bjbj$$ 42FFo< < < < X X x : w y y y y y y $hv u3 3 3   ' ' ' 3 :  w ' 3 w ' ' ' l @bf^< m :' w ( 0X '  v' ' P  ' S  X 3 3 3 3 < <  USING R COMMANDER FOR ASSIGNMENTS FROM CHAPTERS 2 AND 5 TO FIND PROPORTIONS FOR NORMAL DISTRIBUTIONS: Distributions ! Continuous distributions ! Normal distribution ! Normal probabilities A pop-up box will ask you for the value, the mean, and the standard deviation. You do not need to compute the z-score first, just enter the appropriate mean and standard deviation. Alternatively (and more work) you can compute the z-score first, and then use the default mean of 0 and standard deviation of 1. In either case, the answer will appear as a decimal number in the Output Window. TO CREATE HISTOGRAMS AND BOX PLOTS: First, load the data set. The data sets I have provided have commas separating the columns, so make sure you check the radio button comma under Field separator in the pop-up box. (See instructions on handout entitled  How to Install and Use R and R Commander ) To create a histogram: Graphs ! Histogram In the pop-up box, select the variable you want and the type you want. You can choose the number of  bins if you wish (the number of equally spaced intervals to be used). IMPORTANT: Before you create another graph, make sure you save the one you just created so you can print it and include it with your homework! Here is how you do it: Graphs ! Save graph to file! as bitmap (or pdf, etc, if you prefer), then I usually choose JPEG. You can then insert it as a picture into a Word document, or you can just print it. To create a boxplot: Graphs ! Boxplot In the pop-up box, select the variable you want. If you wanted to compare two groups, you could click on Plot by groups and you would be able to select a categorical variable (such as Sex) and then get separate boxplots for the different categories of that variable. Again, remember to save your graph! REGRESSION, SCATTER PLOTS AND CORRELATION To create a scatterplot: Graphs ! Scatter plot In the pop-up box, choose the x-variable (explanatory, goes on horizontal axis) and the y-variable (response, goes on vertical axis). Uncheck all boxes, except possibly  Least-squares line if you want to see the regression line superimposed on the scatter plot. To get the equation for the regression line: Statistics ! Fit models ! Linear regression In the pop-up box, select the response variable and the explanatory variable. (Note that these are in the opposite order from what they were in the scatter plot pop-up box.) The intercept and slope will appear in the midst of a bunch of other stuff in the Output Window in the section labeled Coefficients. The y-intercept is in the row labeled as (Intercept) and the column labeled Estimate. The slope is just below it in that same column, in the row labeled with the name of the explanatory variable. If you want to find the predicted values  EMBED Equation.3  and the residuals y  EMBED Equation.3  do the following: npr| 6 C F i j B D  : bd.Nvx*<xtuvٽŵŬŰŧŰţţ~jh/+U h>Xh>Xh/+h>XB*ph h>X6 h>X5h>X h^5h h^6h^h^5huh0 6h^h^h0 5h0 B*phh0 h0 6h^hqD5h^h>X5hqDh'W hqD5.prz | E F j  < LNx)B,:<gd>Xgd^$a$gdFl.&uv$$%~&&&'* ***++B,D,x, -h.j.l.gd^gd>X$<$$%%%%%%%&&&&&&&'** ********+++ö۲װ𖣲}xsosososohYh hYh6 h^5 hYh5h/+h/+6 h%h% h%5jh/+h%EHUjh%U h%6Uh%jh/+h/+EHUjK M h/+CJUVaJ h/+6h/+jh/+Ujh/+h%EHUj1 M h%CJUVaJ+Models ! Select active models and choose the one you want (you will probably only have one) Then Models ! Add Observation Statistics to Data In the pop-up box, choose  Fitted values which is a synonym for EMBED Equation.3 , and  Residuals. Two new columns will be added to your data set, with values for these. To get a correlation coefficient: Statistics ! Summaries ! Correlation matrix In the pop-up box, choose the 2 variables for which you want the correlation. (Choose 1, then hold down the Ctrl key while you choose the other.) Make sure  Pearson product-moment is checked. A two-way table will appear, with 1.00000& as the correlation of each of the variables with itself, and the correlation you want as the correlation listed in the other corners of the table. TO SAVE YOUR DATA SET SO YOU CAN WORK ON IT AGAIN LATER: Data ! Active data set ! Save active data set Save it where you like. Then the next time you open R Commander, go to: Data ! Load data set It should bring up your files, and just find the one you saved and open it. EXITING R AND R COMMANDER You can exit both at the same time using File! Exit! From Commander and R You will be asked if you want to save your script file and your output. If you need the output for your homework, you should save it. It will be saved as a text file (.txt). +++@,B,D,v,,,,,, -h.j.l. h^h^ hg;hg; hg;6 hg;5hg;h^hYh hYhhYh hYh621h:p0 / =!"#$% Dd @b  c $A? ?3"`?2N"~*bT*D`!""~*bT`! xcdd``> @c112BYL%bpu @c112BYL%bpu @c112BYL%bpuX^FYh/+%g;@rr=rrpBBB 9 o``@` ``$@```0@`$UnknownGz Times New Roman5Symbol3& z Arial"qhd&& >s s !24gg2HX)?qD27USING R COMMANDER FOR ASSIGNMENTS FROM CHAPTERS 2 AND 5UttsUtts  FMicrosoft Office Word Document MSWordDocWord.Document.89q