[R] ED50 from logistic model with interactions
Hi, I was wondering if someone could please help me. I am doing a logistic regression to compare size at maturity between 3 seasons. My model is: fit - glm(Mature ~ Season * Size - 1, family = binomial, data=dat) where Mature is a binary response, 0 for immature, 1 for mature. There are 3 Seasons. The Season * Size interaction is significant. I would like to compare the size at 50% maturity between Seasons, which I have calculated as: Mat50_S1 - -fit$coef[1]/fit$coef[4] Mat50_S2 - -fit$coef[2]/(fit$coef[4] + fit$coef[5]) Mat50_S3 - -fit$coef[3]/(fit$coef[4] + fit$coef[6]) But I am not sure how to calculate the standard error around each of these estimates. The p.dose function from the MASS package does this automatically, but it doesnt seem to allow interaction terms. In Faraway(2006) he has an example using the delta method to calculate the StdErr, but again without any interactions. I can apply this for the first Season, as there is just one intercept and one slope coefficient, but for the other 2 Seasons, the slope is a combination of the Size coefficient and the Size*Season coefficient, and I am not sure how to use the covariance matrix in the delta calculation. I could divide the data and do 3 different logistic regressions, one for each season, but while the Mat50 (i.e. mean Size at 50% maturity) is the same as that calculated by the separate lines regression, Im not sure how this may change the StdErr? Regards, Kate Kate Stark | PhD Candidate Institute of Antarctic Southern Ocean Studies Tasmanian Aquaculture Fisheries Institute University of Tasmania Email: kate.stark at utas.edu.au __ R-help@stat.math.ethz.ch 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.
[R] AR(1) and gls
Hi there, I am using gls from the nlme library to fit an AR(1) regression model. I am wondering if (and how) I can separate the auto-correlated and random components of the residuals? Id like to be able to plot the fitted values + the autocorrelated error (i.e. phi * resid(t-1)), to compare with the observed values. I am also wondering how I might go about calculating confidence (or prediction) intervals around these new fitted values (i.e. fitted new = fitted + autocorrelated error component)? Thanks in advance, Kate == Kate Stark | PhD candidate Institute of Antarctic Southern Ocean Studies Tasmanian Aquaculture Fisheries Institute University of Tasmania. __ R-help@stat.math.ethz.ch 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.
[R] AR(1) models with gls
Hi there, I am using gls from the nlme library to fit an AR(1) regression model. I am wondering if (and how) I can separate the auto-correlated and random components of the residuals? Id like to be able to plot the fitted values + the autocorrelated error (i.e. phi * resid(t-1)), to compare with the observed values. I am also wondering how I might go about calculating confidence (or prediction) intervals around these new fitted values (i.e. fitted new = fitted + autocorrelated error component)? Thanks in advance, Kate == Kate Stark | PhD candidate Institute of Antarctic Southern Ocean Studies Tasmanian Aquaculture Fisheries Institute University of Tasmania. == [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch 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.
[R] AR(1) models with gls
__ R-help@stat.math.ethz.ch 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.