Skip to content

Package ASSIST

4 messages · Chunlei Ke, Brian Ripley, Andrew Criswell

#
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
 

__________________________________
2 days later
#
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:

            
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.
#
Thank you all for the advice.

So, to confirm: If I have

    data.0 <- data.frame(y, x1, x2)
    levels(data.0$x1) <- c('one', 'two', 'three')  ### three levels

    fm1 <- glm(cbind(y, 20 - y) ~ x1 * x2, family = binomial, data = data.0)

then, what I need to do is merge the last two factors to one:

    data.0 <- data.1
    levels(data.1$x1) <- c('one', 'two', 'two')   ### two levels for factor

    fm2 <- glm(cbind(y, 20 - y) ~ x1 * x2, family = binomial, data = data.1)
    anova(fm2, fm1, test = 'Chisq')

Although I understand it achieves the same result, I am not sure what 
numbers to plug into the contrast. The constrat, as it currently stands, is

contrasts(data.0$x1) <- matrix(c(0, 0,
                                 1, 0,
                                 0, 1), ncol = 2, byrow = T)


Andrew
Prof Brian Ripley wrote: