Java Games: Flashcards, matching, concentration, and word search.

Applied Regression Analysis - SHAZAM software

Review of SHAZAM software

AB
QUESTION: How do you get a set of descriptive statistics for all variables currently in memory during a SHAZAM program?ANSWER: The STAT command gives means, standard deviations, variances, minima and maxima.
QUESTION: How do you get a correlation matrix for all of the variables currently in memory during a SHAZAM program?ANSWER: The STAT / PCOR command will give the basic descriptive statistics, followed by a printout of the correlations between all pairs of variables.
QUESTION: How do you get a covariance matrix for all of the variables currently in memory?ANSWER: The STAT / PCOV command will give the basic descriptive statistics, followed by a printout of the covariances between all pairs of variables.
QUESTION: How do you regress Y on X1, X2, and X3?ANSWER: OLS Y X1 X2 X3
QUESTION: How do you ask SHAZAM to test whether a particular slope coefficient is zero?ANSWER: You don't have to ask for this, the test is provided automatically in the form of the t-ratio and the p-value associated with the coefficient in question.
QUESTION: How do you ask SHAZAM to test whether ALL of the slope coefficients in a multiple regression model could be simultaneously zero?ANSWER: Provided you have not specified a / NOANOVA option on your OLS command, the relevant F-test statistic for this hypothesis is provided automatically in the <Analysis of Variance - From Zero> portion of the ANOVA output that begins just before the regression coefficient output. You need not request this test specifically.
QUESTION: How do you refer to regression coefficients when conversing with SHAZAM about the results of a regression?ANSWER: You use the names of the variable to which the coefficient is attached.
QUESTION: How do you calculate and save the mean of a variable for later reference within a SHAZAM program?ANSWER: Use STAT / MEAN=M, for example. Then if AGE, for example, is the fourth variable in the list of descriptive statistics, then M:4 is the fourth element of the vector of variable means. You can use M:4 as you would use a scalar in any subsequent algebra.
QUESTION: How do you generate a new variable as a function of existing variable(s) in SHAZAM?ANSWER: Use the GENR command, e.g. GENR Y=10 + 2 * X + 3 * Z .
QUESTION: How do you generate a scalar in SHAZAM (a single-valued number, not a vector)?ANSWER: Use the GEN1 command.
QUESTION: How do you ask SHAZAM to print the entire set of data for selected variables?ANSWER: Use PRINT VAR1 VAR2 VAR3
QUESTION: How do you get SHAZAM to print out data in a special format?ANSWER: Use a FORMAT(1x,2f10.2,3f6.1) type command, followed directly by a print statement of a form like PRINT y x1 x2 x3 x4 / FORMAT.
QUESTION: How do you get SHAZAM to read data for the same set of observations from three different files (each containing one-third of the variables in the full set)?ANSWER: Use one sample statement, and three different read statements, each directed to a separate input file. Always do a STAT statement at the end to be sure you have gotten what you expected.
UESTION: How can you prevent your SHAZAM regression output from wrapping around and becoming unreadable when you ask NOTEPAD to print your output file?ANSWER: You need to change the MARGINS in the File/Page Setup window associated with the file you are currently trying to print using NOTEPAD. Left and right margins of 0.5 inches should do it.
QUESTION: What kind of plot do you get with the ordinary PLOT command with no special options?ANSWER: You get crummy dot-matrix-type plots that afford very little resolution if you have a large number of observations. Recommend--use GNUplot instead.
QUESTION: How do you get SHAZAM to save the estimated slope and intercept coefficients from a particular OLS regression?ANSWER: Use OLS Y X1 X2 X3 / COEF=B, for example. The vector B will be a column vector with four elements, the slopes on X1, X2, X3, and the intercept term. You can then use later on B:2 to refer to the coefficient on X2, or B:4 to refer to the constant term.
QUESTION: For OLS Y X1 X2 X3, how do you test whether the coefficients on X2 and X3 could be simultaneously equal to zero?ANSWER: Follow the OLS command with a TEST followed by TEST X2=0 then a TEST X3=0, then an END statement (each command on a separate line). This will do the joint F-test you desire, producing an F-test statistic as well as the associated P-value.
QUESTION: For OLS Y X1 X2 X3, how do you test whether the coefficient on X2 is equal to the coefficient on X3?ANSWER: You can follow the OLS command with a TEST X2=X3 command, or with a TEST X2-X3=0 command. Each will produce the appropriate F- and T-test statistics.
QUESTION: For OLS Y X1 X2 X3, how would you test whether the coefficients on all three regressors were equal?ANSWER: Follow the OLS command with TEST, then the three test statements: TEST X2=X3, TEST X2=X4 then END. Note that you do not need TEST X3=X4 because it is redundant if both are equal to the coefficient on X2. This is only two restrictions, since the coefficient on X2 can be whatever the data dictate, just the other two coefficients have to be the same.
QUESTION: In order to include an interaction term, can you use a command like OLS Y X1 X2 X1*X2 ?ANSWER: No, you would need first to generate the interaction term, perhaps GENR Z=X1*X2, then run the regression OLS Y X1 X2 Z. No arithmetic is permitted within an OLS command.
QUESTION: If you are trying to type a command that is so long that it runs past the end of one 80-character line, what do you do?ANSWER: To notify SHAZAM not to start processing the command at the end of the line, use a continuation character, the & symbol, at the end of a line that is NOT the end of a command. This will allow SHAZAM to continue on the next line without starting to execute the command yet.


Trudy Ann Cameron (Prof.)

This activity was created by a Quia Web subscriber.
Learn more about Quia
Create your own activities