Total Pageviews
Tuesday
Framework candidate 1
Sunday
Gologit2 for ordinal outcome
If you have an ordinal outcome /variable ('at risk' drinking, 'alcohol dependent' in a alcohol scale)
If you want to argue that the probabilities of level 1, 2, 3, …n of the outcome are cumulative, (for example, people with increased chance in 'at risk' category have increased chance in 'dependence' category)
If you are trying to adjust for problems caused by nature of a survey (sample does not represent the population due to non-response, finite population correction),
If you want test the proportional odds assumption for your ordinal variable,
- Install gologit2 into stata
- Key in
gologit2 depvar invar list, autofit svy subpop(group var)
If it is not, use separated standard logistic equations, or, you can try multinomial logistic regression
Saturday
Understanding interaction in logistic regression
y = x + z + xz
How to interpret interaction term xy:
xy = when x is held constant, one unit change in z yields a change of ( ....) y / or log odds of y (in cases of logistic regression)
Wednesday
Checking regression parralel in ologit regression
How to do in STATA?
It is the syntax in stata,
ologit y x 1 x2...................... xn
brant, detail
Significant results mean this assumption is violated. Large sample size is sensitive to this test. Recode the violating variable and re-run.
If brant still does not work, download omodel, and run this: (from here)
omodel y x1 x2 x2
Significant results mean that assumption is violated! In other words, coefficients do vary significantly between categories of the response variabl.
Sample size is also a problem. More samples are needed in ologit model than OLS model.
If both tips do not work, go for gologit2, see here
Tests needed to do before regression
- Detecting Unusual and Influential Data
- predict -- used to create predicted values, residuals, and measures of influence.
- rvpplot --- graphs a residual-versus-predictor plot.
- rvfplot -- graphs residual-versus-fitted plot.
- lvr2plot -- graphs a leverage-versus-squared-residual plot.
- dfbeta -- calculates DFBETAs for all the independent variables in the linear model.
- avplot -- graphs an added-variable plot, a.k.a. partial regression plot.
- Tests for Normality of Residuals
- kdensity -- produces kernel density plot with normal distribution overlayed.
- pnorm -- graphs a standardized normal probability (P-P) plot.
- qnorm --- plots the quantiles of varname against the quantiles of a normal distribution.
- iqr -- resistant normality check and outlier identification.
- swilk -- performs the Shapiro-Wilk W test for normality.
- Tests for Heteroscedasticity
- rvfplot -- graphs residual-versus-fitted plot.
- hettest -- performs Cook and Weisberg test for heteroscedasticity.
- whitetst -- computes the White general test for Heteroscedasticity.
- Tests for Multicollinearity
- vif -- calculates the variance inflation factor for the independent variables in the linear model.
- collin -- calculates the variance inflation factor and other multicollinearity diagnostics
- Tests for Non-Linearity
- acprplot -- graphs an augmented component-plus-residual plot.
- cprplot --- graphs component-plus-residual plot, a.k.a. residual plot.
- Tests for Model Specification
- linktest -- performs a link test for model specification.
- ovtest -- performs regression specification error test (RESET) for omitted variables.
Check for multicollinearity
Also called collinearity (when two predictors in the model has near perfect linear combination of one another)
Multicollinearity: more than two!
Method 1:
In stata, after regression, type vif for variance inflation factor
vif
VIF values greater than 10 need further investigations.
1/VIF (called tolerance value) values smaller than 0.1: need further investigations. In other words, the variable could be seen as a linear combination of other independent variables.
Example of case where multicollinearity exists:
vif = 43
1/vif=0.02
Method 2: Use collin for predictors
Still, look for VIF and tolerance. Also look for ‘condition number’, which is at the bottom. Condition number should not be larger than 9, otherwise, collinearity exists.
How to correct for heteroscedasticity in stata
The assumption that variance of residuals is homogenous is often made in regression analysis. However, this assumption needs to be checked. If you are not sure about it, you can use option 'robust' or 'hc3' after 'reg' in Stata.
How to do?
1) small sample: use robust option in reg (stata)
reg DEPVAR ListofPredictor, robust
2) large sample: use hc3 option in reg (stata)
reg DEPVAR listofPredictor, hc3
Read here: http://www.sociology.ohio-state.edu/ptv/faq/heteroscedasticity.htm
Tuesday
Using predict in Stata after regression
1) predicted values of y (y is the dependent variable) no option needed
predict name
2) residuals
predict name, resid
3) standardized residuals
predict name, rstandard
4) studentized or jackknifed residuals
predict name, rstudent
5) leverage
predict name, lev or hat
6) standard error of the residual
predict name, stdr
7) Cook's D
predict name, cooksd
8) standard error of predicted individual y
predict name, stdf
9) standard error of predicted mean y
predict name, stdp
Friday
Why no results in AMOS after boottraping?
'Estimates': show results under Joint Multivariate normality assumption, while boottrap (a smaller window below the main window) should the same estimates but using different parameters calculated by running 250-2000 random samples taken from your sample.
Boottrap creates new 'critical values' for non-normal data, then uses these values to judge the null hypothesis. Under normal condition (normality), a critical value for z statistic is (-1.96: +1.96). But under non-normal condition, this technique creates creates a new 'z' and compare the obtained statistic (whatever it is) with this new one.
Wednesday
corr2data: Make a new var or dataset with correlations/covariance
When correlations/covariances, means or other summary statistics are the only things available. We have to make them a new variable or dataset before we do further analysis. Use corr2data in Stata 11.
I guess when one wants to recalculate published statistics, this is a way to do. Will check it again!
How to detect multivariate outliers using Mahalanobis distance?
Easy! Open data by Stata 11. Then
biplot x1 x2 x3 x4 x5, maha
A nice graph appears, with observations being scaled from +3 to –3 on both x and y axes. Observations that are above +3 and less than –3 are outliers!
Next step: Delete them!
Rudyanto: Handling Non-Normal Data in SEM
This is very good post on handling non-normal data. I helped me with my own CFA model!
Saturday
Many tools to for sample size determination
In many cases, information from previous studies (or a pilot study) are very important to determine sample size.
Friday
Self training multi- modelling & Package to deal with Missing Data :)
Note that multi modelling can be done with many packages, including Stata!
http://www.bristol.ac.uk/cmm/learning/course.html#pay
http://www.bristol.ac.uk/cmm/software/mlwin/ordering/ac-uk.html
In order to deal with missing data (2 -level missing data), go to this website, the package is freely available:
http://www.bristol.ac.uk/cmm/software/realcom/imputation.html
Tuesday
Short list of key terms in a research
Key Terms
concept
A word picture or mental idea of a phenomenon.
conceptual framework
A background or foundation for a study; a less well-developed structure than a theoretical framework; concepts are related in a logical manner by the researcher.
conceptual model
Symbolic presentation of concepts and the relationships between these concepts.
construct
A highly abstract phenomenon that cannot be directly observed but must be inferred by certain concrete or less abstract indicators of the phenomenon.
deductive reasoning
A reasoning process that proceeds from the general to the specific, from theory to empirical data.
empirical generalization
A summary statement about the occurrence of phenomena that is based on empirical data from a number of different research studies.
grand theories
Theories that are concerned with a broad range of phenomena in the environment or in the experiences of humans.
inductive reasoning
A reasoning process that proceeds from the specific to the general, from empirical data to theory.
middle-range theories
Theories that have a narrow focus; they are concerned with only a small area of the environment or of human experiences.
model
A symbolic representation of some phenomenon or phenomena.
proposition
A statement or assertion of the relationship between concepts.
theoretical framework
A study framework based on propositional statements from a theory.
theory
A set of related statements that describes or explains phenomena in a systematic way.