[R] Issue with 95% CI using MASS{confint}

Jennifer Sweatman jenn.sweatman21 at gmail.com
Wed May 27 22:08:58 CEST 2015


I am trying to run a nonlinear model looking at seasonal abundance of
plants with the following limitations:



fit.nls.s<-nls(S_a~beta+m*time+alpha*sin(w*time+phi),

             data= xy,

             start=list(beta=2.1, m=0, alpha=2, phi = 1, w = 1),

             upper=list(beta="inf", m="inf", alpha="inf", phi = 2*pi, w =
"inf"),

             lower=list(beta="-inf", m="-inf", alpha=0, phi = 0, w =
0.0000001),

             algorithm="port")



I want to know the 95% confidence intervals for all of my model
parameters.  I have been using confint from the MASS package but I’m
getting some NA values.  See output below:

confint(fit.nls.s)

            2.5%     97.5%

beta  1.68170858 2.5635734

m     0.02810172 0.0710163

alpha         NA 0.6755750

phi           NA        NA

w             NA 1.0275199

The parameters I most need 95% CIs for are alpha and w (when alpha is
significant), but I consistently get NA for the lower limit of both.  I
have changed my Upper/Lower limits for alpha, phi, and w to +/- infinity,
but my CIs still don’t include complete intervals. Any suggestions as to
what is going on here?



Thank you for your time

	[[alternative HTML version deleted]]



More information about the R-help mailing list