meredith
2012-May-01 20:01 UTC
[R] Hypothesis Testing using Wald Criterion for two regression models with dummy variables
I have two models, controlled by dummy variables to see if the models can be combined into one model with similar intercepts and slopes. Has anyone tried to conduct this type of test in R. I am utilizing the econometric idea of hypothesis testing through the hypothesis of coincidence. I have tried to run an anova with test of Chisq, but I am not sure what the results are telling. In addition, I used the rms package with a lrm model in an anova test, again I am not sure what the results are telling me: Try 1 anova(H,Ha,test="Chi") Analysis of Variance Table Model 1: logload ~ logflow Model 2: logload ~ dummy + logflow Res.Df RSS Df Sum of Sq Pr(>Chi) 1 17 4.6742 2 16 2.6314 1 2.0428 0.0004245 *** --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Try 2: fit<-lrm(logload~logflow+dummy)> anova(fit)Wald Statistics Response: logload Factor Chi-Square d.f. P logflow 17.56 1 <.0001 dummy 5.22 1 0.0224 TOTAL 18.03 2 0.0001 Can anyone help me with this? Thanks! -- View this message in context: http://r.789695.n4.nabble.com/Hypothesis-Testing-using-Wald-Criterion-for-two-regression-models-with-dummy-variables-tp4601582.html Sent from the R help mailing list archive at Nabble.com.
peter dalgaard
2012-May-02 12:58 UTC
[R] Hypothesis Testing using Wald Criterion for two regression models with dummy variables
On May 1, 2012, at 22:01 , meredith wrote:> I have two models, controlled by dummy variables to see if the models can be > combined into one model with similar intercepts and slopes. Has anyone tried > to conduct this type of test in R. I am utilizing the econometric idea of > hypothesis testing through the hypothesis of coincidence. I have tried to > run an anova with test of Chisq, but I am not sure what the results are > telling. In addition, I used the rms package with a lrm model in an anova > test, again I am not sure what the results are telling me: > .... > Can anyone help me with this?Not unless you say what you are trying to do... As far as I can tell, you are (A) using a chi-square test for a standard linear model (Gaussian response) and (B) fitting a logistic regression model to the same response, which assumes that it is a proportion or binary response. Neither makes any sense to me. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
Bert Gunter
2012-May-02 13:41 UTC
[R] Hypothesis Testing using Wald Criterion for two regression models with dummy variables
Meredith: You are clearly out of your depth. Get local help. R-help is, err...., an R help list, not a resource for remote statistical consulting. Although, I admit, there is often some overlap. -- Bert On Wed, May 2, 2012 at 5:58 AM, peter dalgaard <pdalgd at gmail.com> wrote:> > On May 1, 2012, at 22:01 , meredith wrote: > >> I have two models, controlled by dummy variables to see if the models can be >> combined into one model with similar intercepts and slopes. Has anyone tried >> to conduct this type of test in R. I am utilizing the econometric idea of >> hypothesis testing through the hypothesis of coincidence. I have tried to >> run an anova with test of Chisq, but I am not sure what the results are >> telling. In addition, I used the rms package with a lrm model in an anova >> test, again I am not sure what the results are telling me: >> .... >> Can anyone help me with this? > > Not unless you say what you are trying to do... As far as I can tell, you are (A) using a chi-square test for a standard linear model (Gaussian response) and (B) fitting a logistic regression model to the same response, which assumes that it is a proportion or binary response. Neither makes any sense to me. > > -- > Peter Dalgaard, Professor > Center for Statistics, Copenhagen Business School > Solbjerg Plads 3, 2000 Frederiksberg, Denmark > Phone: (+45)38153501 > Email: pd.mes at cbs.dk ?Priv: PDalgd at gmail.com > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm