Regression - Save Variable(s) - Fitted Values
Jump to navigation
Jump to search
Displayr - Regression
Extensions
Q Technical Reference
Q Technical Reference
Q Technical Reference > Multivariate Statistics
Q Technical Reference > Setting Up Data > Creating New Variables
Q Technical Reference > Updating and Automation > Automation Online Library
Q Technical Reference > Updating and Automation > JavaScript > QScript > QScript Examples Library > QScript Online Library
R Online Library
User Interface > Create Regression
User Interface > Regression
Creates a new variable containing fitted values (i.e. the yhat values) for each case in the data from a model (e.g., from Regression - Linear Regression ). Observations with missing values in the predictors are not fitted.
Output
Running this QScript will produce a new variable , which will appear in your data set for use in further analyses.
Technical details
Uses the fitted method from R. Unlike the defaults in most R packages, this implementation assigns fitted values for observations not in the estimation sample.
Code
includeWeb('QScript R Output Functions');
saveVariables('Fitted Values', 'Regression', 'fitted(', ')', null, null, 'fit.val', 'Regression');
Displayr - Regression
Extensions
Q Technical Reference
Q Technical Reference
Q Technical Reference > Multivariate Statistics
Q Technical Reference > Setting Up Data > Creating New Variables
Q Technical Reference > Updating and Automation > Automation Online Library
Q Technical Reference > Updating and Automation > JavaScript > QScript > QScript Examples Library > QScript Online Library
R Online Library
User Interface > Create Regression
User Interface > Regression