Understanding fitplot sas5/26/2023 ![]() Generates a new data set WORK.ch with new variables forv, resid, and stand which we may then to construct residual plots OUTPUT OUT=WORK.ch P=forv R=resid STUDENT=stand We can use PROC REG to calculate and save residuals and predicted values for later use, typically graphics. Residuals where current observation is not used in estimation of corresponding line.We make this into a statistical model by including an error term that describes random variation (because it is unrealistic that everyone with the same obesity score would have exactly the same blood pressure) \[ The parameter of interest is the slope of the line \(\beta_1\): the regression coefficient: Expected difference in blood pressure for two individuals with a difference of 1 unit in obesity score. The intercept \(\beta_0\) is the intersection with vertical axis, i.e. the expected value of \(y\) at \(x=0\): The expected blood pressure for an individual with obesity score 0. So we assume that the obesity score has an effect on the bood pressure. Response variable bp and covariate obese.Linear regression is now used to study the association: XAXIS and YAXIS: larger labels, include grid.YAXIS LABEL='Blood pressure' VALUEATTRS=(SIZE=14) LABELATTRS=(SIZE=14) GRID XAXIS LABEL='Obesity score' VALUEATTRS=(SIZE=14) LABELATTRS=(SIZE=14) GRID SCATTER Y=bp X=obese / MARKERATTRS=(SIZE=12 COLOR=GREEN SYMBOL=SQUARE) ![]() Scatter plots can be created using PROC SGPLOT LIBNAME dat 'p:\sas' Īn improved scatter plot can be made by adding options in PROC SGPLOT LIBNAME dat 'p:\sas' ![]() (where OBS=7 tells SAS to only print the first seven lines in the data set). ![]() We use PROC PRINT to look at the data set LIBNAME dat 'p:\sas' We will discuss simple linear regression in this part of the course and multiple linear regression later. the data set bp.sas7bdat contains three variables: blood pressure ( bp), obesity score ( obese), and gender ( sex).The data sets listed below are all on the home page ![]()
0 Comments
Leave a Reply. |