X hits on this document

Word document

click on “Load Preferences”; (4) click on “Factory Settings.” If the ... - page 10 / 44





10 / 44

approximate the dissimilarities between pairs of objects. (adapted from William Jacoby and David Armstrong, “Multidimensional Scaling 1”, used at the Measurement, Scaling and Dimensional Analysis short course at the 2011 ICPSR Summer Program – available from William Jacoby’s website).  The following  command generates the mds default estimation:

mds  a3a-a3o, id(partic)

Note: you need to specify an “id” – the name of the variable that gives the observation number.  In the command line above, the variable “partic” gives the number assigned to each participant in the study.

View Scores on a Variable: list (then click on variable names and press “enter”)

Graphs/Plots: run a regression prior to each step below.

to graph residuals by predicted values: rvfplot

graph residuals by an ind. variable cons: rvpplot cons

plot cons by tax type: plot cons tax  

leverage vs. residual sq. plot: lvr2plot  

added variable plots (useful for uncovering observations exerting disproportionate influence): avplots

box plots: graph box cons party tax (shows median, 25th, 75th percentile)

histogram of cons: graph twoway histogram cons

scatter plot of tax (on y axis) and cons type: scatter tax cons

>>> to get a graph of variables restax and rescon with both dots and

a regression line type:

graph twoway lfit restax rescons || scatter restax rescons

Interaction Term: gen nsnt=nsa*nt1 (+ - / for other mathematical procedures)   

Dummy Variables: Automatic Creation: if you have a variable entitled “year”

and want to create dummy year variables type: xi i.year   To delete this variable type: drop _I*

Interaction Variables: Automatic Creation: to create an dummy variable for

year and gender type: xi i.year*i.gender  To drop type: drop _I*

Residuals and Predicted Values

    1. run main equation: fit tax cons party stinc

(I believe you can replace “fit” with regres, logit, probit, etc. – “fit” is just for regression – I don’t think “fit” works with logit, etc.)

    2. predict yhat

    3. gen res=tax-yhat

    4. list tax yhat res

Stepwise: allows you to specify significance levels and re-estimate the model

deleting variables that are less significant than the selected threshold. For example: stepswise, pr(.2) hierarchical: regress tax cons party stinc

would mean Stata would estimate the model with all three independent variables and then re-estimate excluding any independent variable that was not significant at the .20 level. Can use with probit, logit, etc.  

Regression Diagnostics: Run a regression with regress.  Now in the command

Document info
Document views350
Page views413
Page last viewedWed Oct 26 11:47:19 UTC 2016