March 5: Logistic regression.
The log odds ratio, called the logit, has the linear relationship with X. The change rate is beta.phi(x)(1-phi(x)). At phi(x)=P(Y=1|X)=1/2, the change rate is the biggest. And x=-alpha/beta. exp(beta) is an odds ratio, the odds at X=x+1 divided by the odds at X=x. 1. Logistic regression with retrospective studies: For sample of subjects haveing Y=1 (cases) and Y=0 (controls), the value of X is observed. Evidence exists of an association if the distribution of X values differs between cases and controls. 2. Type of inferences. (1) wald statistis, z=beta/SE . Under H0, Z^2 is approximately chi-square(1) distribution. (2). The likelihood ratio test uses twice the difference between the maximized log ikelihood at beta_hat and at beta=0. and also has approximately chi-square(1) . (3) The score test uses the log likeliho at beta=0 through the derivative of the log likelihood (the score function) at that point. The test ompare the sufficient statistics for beta to its null expected value.
confidence interval BY WALD method 3. Checking goodness of fit: For any type of binary data, one way to detect lack of fit uses the likelihood-ratio test to compare the model to more complext model. A more complex model might contain non-linear effect or interaction terms. If the more complex model do not fit better, this provides some assurance that the model chosen is reasonable. If the explanatory variable is category, we can compare the observed counts with the fitted values using a Pearson chi-sqaure or likelihood ratio G-SQUARE. It is chi-square distribution with DF equal to the number of parameters - the number of parameters in the model.
4. logit models with categorical predictors (factors). Use dummy variables in logit model. Linear logit model for IX2 tables. 5. Multiple logistic regression. The parameter beta-i refers to the effect of x_i on the log odds that Y=1, controlling the other x_j. exp(beta_j) is the multiplcative effect on the odds of 1-unit increase in x_i, at fixed levels of other x_j. 6. Goodness of fit as a likelihood-ratio test: -2(L_0-L_1) tests whether certain model parameters are zero by comparing the log likelihood L_1 for the fitted model M-1 with L_0 for a simpler model M_0. If M_0=M and M_1 is the saturated model. In test whether M fits, we test whether all parameters in the saturated model but not in M equal zero. The df is the difference in the number of parameters in the model. 7. Fitting the multiple logistic regression by MLE.Newton-Raphson iterative method for logistic regession.
Aril 1, 2017. 学习大纲。 1. 复习statistics教材 2. Probability教材 3. 看SAS PROC SQL, 工作中用SQL写程序 3. 完成ANDREW machine learning 教材 4. Prepare past projects (paper and code) and can explain to people easily. 5. 完成udacity A|B testing course. 6. finish COURSERA Bayes statistics course. 7. Do machine learning projects on Kaggle.com using Python and R. 8. Review regression, ANOVA, analysis of covariance, general linear model and generalized linear model