Re: [R] warning messages in grid or lattice give that I can't debug

2007-08-02 Thread deepayan . sarkar
On 8/2/07, Richard M. Heiberger <[EMAIL PROTECTED]> wrote:
> Thanks Deepayan.
>
> Does that translate that I don't have to do anything else,
> and that I can submit the package in its present state to CRAN?

No, you have to make sure that 'fill' is not a factor. My guess is
that the simplest way to do that would be to not make key$points a
data.frame, but I haven't actually looked at what your code is doing.

-Deepayan

__
[email protected] 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.


Re: [R] warning messages in grid or lattice give that I can't debug

2007-08-02 Thread Richard M. Heiberger
Thanks Deepayan.

Does that translate that I don't have to do anything else,
and that I can submit the package in its present state to CRAN?

Rich

__
[email protected] 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.


Re: [R] warning messages in grid or lattice give that I can't debug

2007-08-02 Thread Deepayan Sarkar
On 8/2/07, Richard M. Heiberger <[EMAIL PROTECTED]> wrote:
> The messages are visible in 2.6.0dev
> The same commands in 2.4.1 work without warning messages.
> I am using the HH_1.18-1 from R_2.4.1 with both R versions and not
> the current HH_2.1-3
>
> version$version.string
> installed.packages()[c("grid","lattice", "HH"),3]
> ## library(HH)
> library(lattice, lib.loc="C:/PROGRA~1/R/R-2.4.1/library")
> hotdog <- read.table(hh("datasets/hotdog.dat"), header=TRUE)
> ancova(Sodium ~ Calories + Type, data=hotdog)
>
>
> the messages in R_2.6.0dev are
> Warning messages:
> 1: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) :
>   supplied color is not numeric nor character
> ...
> 6: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) :
>   supplied color is not numeric nor character
>
>
> My guess is that these warnings are a response to a change in grid or lattice
> in 2.5.0.  I attempted to trace these with
> options(warn=2)
> options(error=recover)
> without success.
>
> Debugging suggestions or revised programming suggestions would be appreciated.

Well, options(warn=2) traces the problem to the legend drawing code,
and going from there, I get

> str(trellis.last.object()$legend$right$args$key$points)
'data.frame':   3 obs. of  6 variables:
 $ alpha: num  1 1 1
 $ cex  : num  0.8 0.8 0.8
 $ col  : chr  "#0080ff" "#ff00ff" "darkgreen"
 $ font : num  1 1 1
 $ pch  : num  1 1 1
 $ fill : Factor w/ 1 level "transparent": 1 1 1

Note that the last component 'fill' is a factor (which is "not numeric
nor character", at least in a zen kind of way). I presume you are
somehow protecting 'col' from becoming a factor, and that does not
translate to 'fill'.

This behaviour (of HH) is not new, and I believe you will see the same
output as above in R 2.4. What's new is that 'fill' used to be ignored
by draw.key(), which was a bug in lattice that has now been fixed.

-Deepayan

__
[email protected] 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.


Re: [R] warning messages in grid or lattice give that I can't debug

2007-08-02 Thread Richard M. Heiberger

Uwe Ligges wrote:
> It is essential not to use a lattice version designed for R-2.4.1 with 
> R-devel... And I don't see a reason, and in some cases, switching to 
> another major version of R requires recompiling of packages anyway.

The warnings first appeared in 2.6.0dev when I recompiled my package
for 2.6.0dev.   The warnings are not detected by R CMD CHECK and still
appear in HH_2.1-3 (not yet on CRAN) after I repaired everything the
R CMD CHECK does find.

I backed up to the 2.4.1 compilation of HH along with the complete
2.6.0dev environment, including lattice and grid, to confirm that I had
not introduced new errors.  I believe the warnings come from a change made
to R, probably in lattice or grid, that are not detected by R CMD CHECK.

Uwe is correct that the older lattice and grid will not load with the newer
R.

Rich

__
[email protected] 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.


Re: [R] warning messages in grid or lattice give that I can't debug

2007-08-02 Thread Uwe Ligges


Richard M. Heiberger wrote:
> The messages are visible in 2.6.0dev
> The same commands in 2.4.1 work without warning messages.
> I am using the HH_1.18-1 from R_2.4.1 with both R versions and not
> the current HH_2.1-3
> 
> version$version.string
> installed.packages()[c("grid","lattice", "HH"),3]
> ## library(HH)
> library(lattice, lib.loc="C:/PROGRA~1/R/R-2.4.1/library")

It is essential not to use a lattice version designed for R-2.4.1 with 
R-devel... And I don't see a reason, and in some cases, switching to 
another major version of R requires recompiling of packages anyway.

Uwe Ligges





> hotdog <- read.table(hh("datasets/hotdog.dat"), header=TRUE)
> ancova(Sodium ~ Calories + Type, data=hotdog)
> 
> 
> the messages in R_2.6.0dev are
> Warning messages:
> 1: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) :
>   supplied color is not numeric nor character
> ...
> 6: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) :
>   supplied color is not numeric nor character
> 
> 
> My guess is that these warnings are a response to a change in grid or lattice
> in 2.5.0.  I attempted to trace these with 
> options(warn=2)
> options(error=recover)
> without success.
> 
> Debugging suggestions or revised programming suggestions would be appreciated.
> 
> Rich
> 
> __
> [email protected] 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.

__
[email protected] 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] warning messages in grid or lattice give that I can't debug

2007-08-02 Thread Richard M. Heiberger
The messages are visible in 2.6.0dev
The same commands in 2.4.1 work without warning messages.
I am using the HH_1.18-1 from R_2.4.1 with both R versions and not
the current HH_2.1-3

version$version.string
installed.packages()[c("grid","lattice", "HH"),3]
## library(HH)
library(lattice, lib.loc="C:/PROGRA~1/R/R-2.4.1/library")
hotdog <- read.table(hh("datasets/hotdog.dat"), header=TRUE)
ancova(Sodium ~ Calories + Type, data=hotdog)


the messages in R_2.6.0dev are
Warning messages:
1: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) :
  supplied color is not numeric nor character
...
6: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) :
  supplied color is not numeric nor character


My guess is that these warnings are a response to a change in grid or lattice
in 2.5.0.  I attempted to trace these with 
options(warn=2)
options(error=recover)
without success.

Debugging suggestions or revised programming suggestions would be appreciated.

Rich

__
[email protected] 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.


Re: [R] Warning Messages using rq -quantile regressions

2006-07-23 Thread roger koenker

On Jul 23, 2006, at 5:27 AM, roger koenker wrote:

> When computing the median from a sample with an even number of  
> distinct
> values there is inherently some ambiguity about its value:  any  
> value between
> the middle order statistics is "a" median.  Similarly, in  
> regression settings the
> optimization problem solved by the "br" version of the simplex  
> algorithm,
> modified to do general quantile regression identifies cases where  
> there may
> be non uniqueness of this type.  When there are "continuous"  
> covariates this
> is quite rare, when covariates are discrete then it is relatively  
> common, at
> least when tau is chosen from the rationals.  For univariate  
> quantiles R provides
> several methods of resolving this sort of ambiguity by  
> interpolation, "br" doesn't
> try to do this, instead returning the first vertex solution that it  
> comes to.  Should
> we worry about this?  My answer would be no.  Viewed from an  
> asymptotic
> perspective any choice of a unique value among the multiple  
> solutions is a
> 1/n perturbation  -- with 2500 observations this is unlikely to be  
> interesting.
> More to the point, inference about the coefficients of the model,  
> which provides
> O(1/sqrt(n)) intervals is perfectly capable of assessing the  
> meaningful uncertainty
> about these values.  Finally, if you would prefer an estimation  
> procedure that
> produced unique values more like the interpolation procedures in  
> the univariate
> setting, you could try the "fn" option for the algorithm.  Interior  
> point methods for
> solving linear programming problems have the "feature" that they  
> tend to converge
> to the centroid of solutions sets when such sets exist.  This  
> approach provides a
> means to assess the magnitude of the non-uniqueness in a particular  
> application.
>
> I hope that this helps,
>
> url:www.econ.uiuc.edu/~rogerRoger Koenker
> email   [EMAIL PROTECTED]   Department of  
> Economics
> vox:217-333-4558University of Illinois
> fax:217-244-6678Champaign, IL 61820
>
>
> On Jul 22, 2006, at 9:07 PM, Neil KM wrote:
>
>> I am a new to using quantile regressions in R. I have estimated a  
>> set of
>> coefficients using the method="br" algorithm with the rq command  
>> at various
>> quantiles along the entire distribution.
>>
>> My data set contains approximately 2,500 observations and I have 7  
>> predictor
>> variables. I receive the following warning message:
>>
>> Solution may be nonunique in: rq.fit.br(x, y, tau = tau, ...)
>>
>> There are 13 warnings of this type after I run a single  model. My  
>> results
>> are similiar to the results I received in other stat programs  
>> using quantile
>> reg procedures. I am unclear what these warning messages imply and  
>> if there
>> are problems with model fit/convergence that I may need to consider.
>> Any help would be appreciated. Thanks!
>>
>> __
>> [email protected] 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.
>

__
[email protected] 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] Warning Messages using rq -quantile regressions

2006-07-22 Thread Neil KM
I am a new to using quantile regressions in R. I have estimated a set of 
coefficients using the method="br" algorithm with the rq command at various 
quantiles along the entire distribution.

My data set contains approximately 2,500 observations and I have 7 predictor 
variables. I receive the following warning message:

Solution may be nonunique in: rq.fit.br(x, y, tau = tau, ...)

There are 13 warnings of this type after I run a single  model. My results 
are similiar to the results I received in other stat programs using quantile 
reg procedures. I am unclear what these warning messages imply and if there 
are problems with model fit/convergence that I may need to consider.
Any help would be appreciated. Thanks!

__
[email protected] 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.


Re: [R] warning messages

2006-06-25 Thread Michael Prager
You might consider passing the output file name to the function as an 
argument.


Matthew Bridgman wrote on 6/25/2006 10:49 AM:
> I want to put warning messages into some of my functions to remind 
> myself to change the output file names each time I run them. Is there a 
> way to do this that will allow me to respond to the warning message 
> (i.e. "continue function" or "cancel")?
>
> Thanks,
>Matt
>
> __
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>   

-- 
Michael H. Prager, Ph.D.
Population Dynamics Team
NOAA Center for Coastal Habitat and Fisheries Research
NMFS Southeast Fisheries Science Center
Beaufort, North Carolina  28516  USA
http://shrimp.ccfhrb.noaa.gov/~mprager/

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] warning messages

2006-06-25 Thread Gabor Grothendieck
One small improvement, the cat can be eliminated:

f <- function() {
   x <- readline("c to continue, anything else to quit: ")
   if (x != "c") stop("User forced exit")
   # rest of function
}

f()



On 6/25/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> Try this:
>
> f <- function() {
>cat("c to continue, anything else to quit: ")
>x <- readline()
>if (x != "c") stop("User forced exit")
># rest of function
> }
>
> f()
>
> On 6/25/06, Matthew Bridgman <[EMAIL PROTECTED]> wrote:
> > I want to put warning messages into some of my functions to remind
> > myself to change the output file names each time I run them. Is there a
> > way to do this that will allow me to respond to the warning message
> > (i.e. "continue function" or "cancel")?
> >
> > Thanks,
> >   Matt
> >
> > __
> > [email protected] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! 
> > http://www.R-project.org/posting-guide.html
> >
>

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] warning messages

2006-06-25 Thread Gabor Grothendieck
Try this:

f <- function() {
cat("c to continue, anything else to quit: ")
x <- readline()
if (x != "c") stop("User forced exit")
# rest of function
}

f()

On 6/25/06, Matthew Bridgman <[EMAIL PROTECTED]> wrote:
> I want to put warning messages into some of my functions to remind
> myself to change the output file names each time I run them. Is there a
> way to do this that will allow me to respond to the warning message
> (i.e. "continue function" or "cancel")?
>
> Thanks,
>   Matt
>
> __
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] warning messages

2006-06-25 Thread Matthew Bridgman
I want to put warning messages into some of my functions to remind 
myself to change the output file names each time I run them. Is there a 
way to do this that will allow me to respond to the warning message 
(i.e. "continue function" or "cancel")?

Thanks,
   Matt

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] warning messages ?

2006-05-09 Thread orkun
hello

I received these warning messages while I was building
logistic regression model.

Could you tell me why  this warnings arises ?

regards

Warning messages:
1: algorithm did not converge in: glm.fit(x = X, y = Y, weights = 
weights, start = start, etastart = etastart,
2: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y 
= Y, weights = weights, start = start, etastart = etastart,

-- 
Ahmet Temiz
Jeoloji Müh.
Afet İşleri Genel Müdürlüğü
Deprem Araştırma Dairesi
Tel: (312) 287 89 51 veya (312) 287 26 80/1547
Faks: (312) 287 89 51
E. Posta: [EMAIL PROTECTED]
 www.deprem.gov.tr

Ahmet Temiz
Geological Eng.
General Directorate of Disaster Affairs
Earthquake Research Department
Phone: +90 (312) 287 89 51 or (312) 287 26 80/1547
Fax: +90 (312) 287 89 51
E. Mail: [EMAIL PROTECTED]
www.deprem.gov.tr


-- 
This message has been scanned for viruses and\ dangerous con...{{dropped}}

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Warning messages in lmer function (package lme4)

2005-06-13 Thread Douglas Bates
On 6/13/05, CENDOYA, María Gabriela <[EMAIL PROTECTED]> wrote:
> Hi:
> 
> I'm using function lmer from package lme4, and I get this message:
> 
> " There were 12 warnings (use warnings() to see them)"
> 
> So I checked them:
> 
> Warnings 1 to 11 said:
> 
> 1: optim returned message ERROR: ABNORMAL_TERMINATION_IN_LNSRCH
> 
>  in: "LMEoptimize<-"(`*tmp*`, value = structure(list(maxIter = 50,   ...
> 
> 
> 
> and Warning 12 said:
> 
> 12: IRLS iterations for glmm did not converge in: lmer(Enfermo ~ Bloque +
> Trat * Var * dia + (1 | IDfruto), data = desinf,   ...

> There was no error message in the call of lmer function, so:
> 
> What do these warnings mean?
> 
> Do these errors occur at earlier iterations but finally the model converges?

Yes. The PQL and Laplace methods for fitting generalized linear mixed
models perform optimization of a criterion that is itself determined
by an optimization problem.  These warnings come from earlier
iterations and are warnings.
 
> Can the model I got be trusted?

Well George Box said that "All models are wrong" so in that sense you
can't trust any fitted model.  This type of model is difficult to fit
and you should, as with all model fits, check the parameter values to
see if they make sense to you.

You may want to try the same fit in a test build of R-devel, which
will become R-2.2.0.  In R-2.1.0 part of the optimization problem is
performed by optim() and I have had some peculiar results from optim
using method="L-BFGS-B".  In constrained minimization I have had
optim() declare convergence to a value on the boundary where the
objective function was larger than at the starting point.  I have
added the function nlminb() to the development version of R-2.2.0 and
use that for the constrained optimization problem in lmer().  I have
found the results to be more reliable than those from optim().

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Warning messages in lmer function (package lme4)

2005-06-13 Thread CENDOYA, María Gabriela
Hi:

I'm using function lmer from package lme4, and I get this message:



" There were 12 warnings (use warnings() to see them)"

So I checked them:

Warnings 1 to 11 said:

1: optim returned message ERROR: ABNORMAL_TERMINATION_IN_LNSRCH

 in: "LMEoptimize<-"(`*tmp*`, value = structure(list(maxIter = 50,   ...



and Warning 12 said:

12: IRLS iterations for glmm did not converge in: lmer(Enfermo ~ Bloque +
Trat * Var * dia + (1 | IDfruto), data = desinf,   ...



There was no error message in the call of lmer function, so:

What do these warnings mean?

Do these errors occur at earlier iterations but finally the model converges?

Can the model I got be trust?



Thanks, Gabriela.



PD: I'm using:

Windows XP ,

R 2.1.0,

Package lme4, version 0.95-6

And the fitted model was:

modelo1 <- lmer(Enfermo ~ Bloque+Trat*Var*dia+(1|IDfruto),

 data=desinf,
subset=!desinf$dia==1&!desinf$Trat=="Sin_inoculo",

 family=binomial)

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Warning messages in function fitdistr (library:MASS)

2004-10-27 Thread Prof Brian Ripley
On Wed, 27 Oct 2004, De la Vega Góngora Jorge wrote:

> Why the warning messages (2:4)?

The warnings are about your uninformed use of the function.  You have read
the reference (as the R posting guide asks) haven't you?

You are trying to fit a distribution with parameter > 0 by an
*unconstrained* optimizer with a deliberately poor starting value,
ignoring warning 1.

> > x <- rexp(1000,0.2)
> > fitdistr(x,"exponential",list(rate=1))
>   rate
>   0.219824219 
>  (0.006951308)
> Warning messages: 
> 1: one-diml optimization by Nelder-Mead is unreliable: use optimize in: optim(start, 
> mylogfn, x = x, hessian = TRUE, ...) 
> 2: NaNs produced in: dexp(x, 1/rate, log) 
> 3: NaNs produced in: dexp(x, 1/rate, log) 
> 4: NaNs produced in: dexp(x, 1/rate, log) 

fitdistr(x,"exponential",list(rate=1), lower=0.001, method="L-BFGS-B")

would be a much better way, following the examples on the help page.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Warning messages in function fitdistr (library:MASS)

2004-10-27 Thread De la Vega Góngora Jorge
Why the warning messages (2:4)?

> x <- rexp(1000,0.2)
> fitdistr(x,"exponential",list(rate=1))
  rate
  0.219824219 
 (0.006951308)
Warning messages: 
1: one-diml optimization by Nelder-Mead is unreliable: use optimize in: optim(start, 
mylogfn, x = x, hessian = TRUE, ...) 
2: NaNs produced in: dexp(x, 1/rate, log) 
3: NaNs produced in: dexp(x, 1/rate, log) 
4: NaNs produced in: dexp(x, 1/rate, log) 

and with respect to this function, it is curious that only for the normal family the 
mle is obtained in closed form. Why not in other cases like the exponential?

Using R 1.9.1 or 2.0.0 under Windows.

Jorge

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] warning messages

2004-04-06 Thread Kersten Magg
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-new
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch
X-Spam-Level: 
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63

Hello,

I've got some problems with warning messages. In the context of complex statistical 
simulations I use among other things the function glm(). During large replications in 
the simulation study I get sometimes different kinds of warning messages. For example: 
model did not converge or fitted probabilities 0 or 1, ... 
My question is now: how can I handle these messages? I want to transform the special 
warning message in a binary code and want to save it in a vector of warnings. The 
problem I've got is that
the command last.warning doesn't work if I start the simulationen with source("..."). 
The function glm() is part of R-programs in second or third level. I think the 
top-level function is the cause of 
my problems but I don't know how I can solve the problem.

Could you help me?!
Thanks a lot!

Kersten
___
... and the winner is... WEB.DE FreeMail! - Deutschlands beste E-Mail

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html