Dear R-list, We have put together a package ASSIST, a collection of R functions for fitting many spline-based non-parametric/semi-parametric linear/non-linear fixed/mixed models, including polynomial, periodic, spherical, thin-plate splines and L splines as well as smoothing spline ANOVA models. It also coveres some cases of generalized additive models, multiple index models, varying coefficient models, functional linear models, and self-modeling nonlinear regression models. The package contains five main R functions: 1. ssr fits non-parametric regression models for independent and correlated Gaussian data, and for independent binomial, Poisson and Gamma data; 2. slm fits semi-parametric linear mixed-effects models; 3. nnr fits non-parametric nonlinear regression models; 4. snr fits semi-parametric nonlinear regression models; and 5. snm fits semi-parametric nonlinear mixed-effects models. These extend such existing functions in R (S+) as smooth.spline, gam, nls, lme and nlme. ASSIST may be obtained at CRAN or http://www.pstat.ucsb.edu/faculty/yuedong/software Detail information about these functions and many examples can be found in the manual of this package, which again can be downloaded from the above site. Comments and suggestions are highly appreciated! Great thanks! Yuedong Wang and Chunlei Ke __________________________________
Hello All: I have a binomial model with one covariate, x1, treated as a factor with 3 levels. The other covariate is measured x2 <- 1:30. The response, y, is the proportion of successes out of 20 trials. glm(cbind(y, 20 - y) ~ x1 * x2, family = binomial) Now, I would like to constrain the cofficients on 2 levels of the factor, x1, to be identical and test the difference between these models by a likelihood ratio test. How can I get glm() to constrain the coefficients on 2 levels to be the same? Thanks, ANDREW
On Fri, 5 Mar 2004, Andrew Criswell wrote:> I have a binomial model with one covariate, x1, treated as a factor with > 3 levels. The other covariate is measured x2 <- 1:30. The response, y, > is the proportion of successes out of 20 trials. > > glm(cbind(y, 20 - y) ~ x1 * x2, family = binomial) > > Now, I would like to constrain the cofficients on 2 levels of the > factor, x1, to be identical and test the difference between these models > by a likelihood ratio test. > > How can I get glm() to constrain the coefficients on 2 levels to be the > same?Merge the levels of the factor: see ?levels. You could also set up a custom contrasts matrix: either way the natural S approach is to reparametrize rather than constrain. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595