[R] error message!

2007-08-26 Thread Usman Shehu
Dear R-users,
Can some one help me out. I tried installing some packages in R_2.5.1  but I 
get an error message as shown below. This is unusual since I have been 
installing and updatings packages in the same version of R.

 chooseCRANmirror()
 update.packages(ask='graphics')
Error in .readRDS(pfile) : unknown input format
or
 utils:::menuInstallPkgs()
Error in .readRDS(pfile) : unknown input format


Thanks

usman


  ___ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  
http://uk.promotions.yahoo.com/forgood/environment.html
[[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.


Re: [R] error message!

2007-08-26 Thread Duncan Murdoch
On 26/08/2007 6:13 AM, Usman Shehu wrote:
 Dear R-users,
 Can some one help me out. I tried installing some packages in R_2.5.1  but I 
 get an error message as shown below. This is unusual since I have been 
 installing and updatings packages in the same version of R.
 
 chooseCRANmirror()
 update.packages(ask='graphics')
 Error in .readRDS(pfile) : unknown input format
 or
 utils:::menuInstallPkgs()
 Error in .readRDS(pfile) : unknown input format

I'd guess it's a problem with the mirror.  Which one did you choose?  Do 
you get the same error if you choose a different one?

Duncan Murdoch

__
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.


Re: [R] error message!

2007-08-26 Thread Duncan Murdoch
Usman Shehu wrote:
 It is not. I tried using a number of mirrors, eg Germany, Uk(Bristol), 
 Netherlands, etc.

   
In that case, you'll have to debug it.  Run traceback after the error.  
.readRDS(pfile) is called in several different places; you'll need to 
find out where it's happening, and why it's failing. The traceback() 
will tell you where; you can use debug() on that function to single step 
through until you get to this line, and see what pfile is set to.

BTW, please keep the discussion in R-help; someone else may have better 
contributions than me.

Duncan

 - Original Message 
 From: Duncan Murdoch [EMAIL PROTECTED]
 To: Usman Shehu [EMAIL PROTECTED]
 Cc: r-help@stat.math.ethz.ch
 Sent: Sunday, 26 August, 2007 12:02:13 PM
 Subject: Re: [R] error message!


 On 26/08/2007 6:13 AM, Usman Shehu wrote:
   
 Dear R-users,
 Can some one help me out. I tried installing some packages in R_2.5.1  but I 
 get an error message as shown below. This is unusual since I have been 
 installing and updatings packages in the same version of R.

 
 chooseCRANmirror()
 update.packages(ask='graphics')
   
 Error in .readRDS(pfile) : unknown input format
 or
 
 utils:::menuInstallPkgs()
   
 Error in .readRDS(pfile) : unknown input format
 

 I'd guess it's a problem with the mirror.  Which one did you choose?  Do 
 you get the same error if you choose a different one?

 Duncan Murdoch


   ___
 Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
 now.
 http://uk.answers.yahoo.com/ 


__
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.


Re: [R] Error message when using zero-inflated count regression model in package zicounts

2007-08-16 Thread James R. Milks
Dr. Stevens,

I've double-checked my variable lengths.  All of my variables  
(Total.vines, Site, Species, and DBH) came in at 549.  I did correct  
one problem in the data entry that had escaped my previous notice:  
somehow the undergrad who entered all the data managed to make the  
Acer negundo data split into two separate categories while still  
appearing to use the same ACNE abbreviation.  When I made that  
correction and re-ran zicounts, R gave me the following error messages:

  vines.zip-zicounts(resp=Total.vines~.,x=~Site+Species+DBH,z=~Site 
+Species+DBH,distname=ZIP,data=sycamores.1)

Error in ifelse(y == 0, 1, y/mu) : dim-: dims [product 12] do not  
match the length of object [549]
In addition: Warning messages:
1: longer object length is not a multiple of shorter object length  
in: eta + offset
2: longer object length is not a multiple of shorter object length  
in: y/mu

In addition, zicounts would not run a normal poisson regression on  
the data, giving me the same error messages as the ZIP regression.   
Doing a poisson regression with glm did not show any error messages.   
However, the glm model with full interactions was still over-dispersed.

Could the zicounts problem be that the individual sites and species  
had different population sizes?  For instance, Site A had 149 trees,  
site B had 55 trees, site C had 270 trees, and site D had 75 trees.   
The species had similar discrepancies in population sizes, with  
Platanus occidentalis and Acer negundo forming the majority of the  
trees.

Thanks for your help.

Jim Milks

Graduate Student
Environmental Sciences Ph.D. Program
136 Biological Sciences
Wright State University
3640 Colonel Glenn Hwy
Dayton, OH 45435

On Aug 15, 2007, at 5:58 AM, Martin Henry H. Stevens wrote:

 Hi Jim,
 With regard to same number, I simply wanted to make sure that each  
 variable was the same length. The error message you show is what  
 you would get if, for instance, you misspelled one of the variables  
 and it doesn't exist, in which case it would be NULL, while your  
 other variables would each be 550 elements in length.
 Hank
 On Aug 14, 2007, at 4:47 PM, James Milks wrote:

 Dr. Stevens,

 Unfortunately, Poisson gives me an over-dispersed model with only  
 3 out of 14 variables/interactions significant.  Doing a step-wise  
 poisson regression still ended up with the same over-dispersed  
 model.  Given the high number of zeros in the response variable,  
 Dr. Thad Tarpey (one of our statisticians on campus) suggested  
 zero-inflated poisson regression as a possible solution to the  
 over-dispersion problem.

 As for variables of the same length, there are different numbers  
 of trees for each species and site since we ran different numbers  
 of transects at each site (some sites were larger than others) and  
 there were different numbers of species and trees within each  
 transect.  Acer negundo made up ~33% of all the trees we measured;  
 Platanus occidentalis had 25%; Fraxinus americana was another 12%  
 and ~11% was Ulmus americana.  The remaining 25% was divided among  
 16 other species, all of which were excluded from the analysis due  
 to singularities in the model when they were included (something  
 about glm not liking singularities in the model).  So if the  
 zicounts requires that each species and site have the same length,  
 then I will not be able to use it unless I can get R to randomly  
 select x trees from each species and site combination.

 Thanks for your input.

 Jim Milks

 Graduate Student
 Environmental Sciences Ph.D. Program
 136 Biological Sciences
 Wright State University
 3640 Colonel Glenn Hwy
 Dayton, OH 45435


 On Aug 14, 2007, at 9:37 AM, Hank Stevens wrote:

 Hi Jim,
 Two thoughts come to me, unencumbered by the thought process or  
 knowledge of zicounts:
 1. Is Poisson really NOT appropriate? (do you have to use zicounts?)
 2. Are you 110% certain that all variables are the same length?  
 Would NA's interfere?
 Cheers,
 Hank
 On Aug 13, 2007, at 5:10 PM, James Milks wrote:

 I have data on number of vines per tree for ~550 trees.  Over  
 half of
 the trees did not have any vines and the data is fairly skewed
 (median = 0, mean = 1.158, 3rd qu. = 1.000).  I am attempting to
 investigate whether plot location (four sites), species (I'm using
 only the four most common species), or tree dbh has a significant
 influence on the number of vines per tree.  When I attempted to use
 the zicounts function, R gave me the following error message:

 vines.zip-zicounts(resp=Total.vines~.,x=~Site+Species+DBH,z=~Site
 +Species+DBH,distrname=ZIP,data=sycamores.1)
 Error in ifelse(y == 0, 1, y/mu) : dim- : dims [product 12] do not
 match the length of object [549]
 In addition: Warning messages:
 1: longer object length
 is not a multiple of shorter object length in: x[good, ]  
 * w
 2: longer object length
 is not a multiple of shorter object length in: eta + offset
 3: longer object 

Re: [R] Error message when using zero-inflated count regression model in package zicounts

2007-08-16 Thread Achim Zeileis
On Thu, 16 Aug 2007, James R. Milks wrote:

 Dr. Stevens,

 I've double-checked my variable lengths.  All of my variables
 (Total.vines, Site, Species, and DBH) came in at 549.  I did correct
 one problem in the data entry that had escaped my previous notice:
 somehow the undergrad who entered all the data managed to make the
 Acer negundo data split into two separate categories while still
 appearing to use the same ACNE abbreviation.  When I made that
 correction and re-ran zicounts, R gave me the following error messages:

Hmm, I don't know about the error messages in zicounts, but you could try 
to use the zeroinfl() implementation in package pscl:
   vines.zip - zeroinfl(Total.vines ~ Site + Species + DBH | Site +
 Species + DBH, data = sycamores.1)
and see whether this produces a similar error.
Z

  vines.zip-zicounts(resp=Total.vines~.,x=~Site+Species+DBH,z=~Site
 +Species+DBH,distname=ZIP,data=sycamores.1)

 Error in ifelse(y == 0, 1, y/mu) : dim-: dims [product 12] do not
 match the length of object [549]
 In addition: Warning messages:
 1: longer object length is not a multiple of shorter object length
 in: eta + offset
 2: longer object length is not a multiple of shorter object length
 in: y/mu

 In addition, zicounts would not run a normal poisson regression on
 the data, giving me the same error messages as the ZIP regression.
 Doing a poisson regression with glm did not show any error messages.
 However, the glm model with full interactions was still over-dispersed.

 Could the zicounts problem be that the individual sites and species
 had different population sizes?  For instance, Site A had 149 trees,
 site B had 55 trees, site C had 270 trees, and site D had 75 trees.
 The species had similar discrepancies in population sizes, with
 Platanus occidentalis and Acer negundo forming the majority of the
 trees.

 Thanks for your help.

 Jim Milks

 Graduate Student
 Environmental Sciences Ph.D. Program
 136 Biological Sciences
 Wright State University
 3640 Colonel Glenn Hwy
 Dayton, OH 45435

 On Aug 15, 2007, at 5:58 AM, Martin Henry H. Stevens wrote:

 Hi Jim,
 With regard to same number, I simply wanted to make sure that each
 variable was the same length. The error message you show is what
 you would get if, for instance, you misspelled one of the variables
 and it doesn't exist, in which case it would be NULL, while your
 other variables would each be 550 elements in length.
 Hank
 On Aug 14, 2007, at 4:47 PM, James Milks wrote:

 Dr. Stevens,

 Unfortunately, Poisson gives me an over-dispersed model with only
 3 out of 14 variables/interactions significant.  Doing a step-wise
 poisson regression still ended up with the same over-dispersed
 model.  Given the high number of zeros in the response variable,
 Dr. Thad Tarpey (one of our statisticians on campus) suggested
 zero-inflated poisson regression as a possible solution to the
 over-dispersion problem.

 As for variables of the same length, there are different numbers
 of trees for each species and site since we ran different numbers
 of transects at each site (some sites were larger than others) and
 there were different numbers of species and trees within each
 transect.  Acer negundo made up ~33% of all the trees we measured;
 Platanus occidentalis had 25%; Fraxinus americana was another 12%
 and ~11% was Ulmus americana.  The remaining 25% was divided among
 16 other species, all of which were excluded from the analysis due
 to singularities in the model when they were included (something
 about glm not liking singularities in the model).  So if the
 zicounts requires that each species and site have the same length,
 then I will not be able to use it unless I can get R to randomly
 select x trees from each species and site combination.

 Thanks for your input.

 Jim Milks

 Graduate Student
 Environmental Sciences Ph.D. Program
 136 Biological Sciences
 Wright State University
 3640 Colonel Glenn Hwy
 Dayton, OH 45435


 On Aug 14, 2007, at 9:37 AM, Hank Stevens wrote:

 Hi Jim,
 Two thoughts come to me, unencumbered by the thought process or
 knowledge of zicounts:
 1. Is Poisson really NOT appropriate? (do you have to use zicounts?)
 2. Are you 110% certain that all variables are the same length?
 Would NA's interfere?
 Cheers,
 Hank
 On Aug 13, 2007, at 5:10 PM, James Milks wrote:

 I have data on number of vines per tree for ~550 trees.  Over
 half of
 the trees did not have any vines and the data is fairly skewed
 (median = 0, mean = 1.158, 3rd qu. = 1.000).  I am attempting to
 investigate whether plot location (four sites), species (I'm using
 only the four most common species), or tree dbh has a significant
 influence on the number of vines per tree.  When I attempted to use
 the zicounts function, R gave me the following error message:

 vines.zip-zicounts(resp=Total.vines~.,x=~Site+Species+DBH,z=~Site
 +Species+DBH,distrname=ZIP,data=sycamores.1)
 Error in ifelse(y == 0, 1, y/mu) : dim- : dims [product 12] do not
 

Re: [R] Error message when using zero-inflated count regression model in package zicounts

2007-08-16 Thread James Milks
No, zeroinfl() in pscl did not give me any errors when I ran the  
model.  So there may be a bug in zicounts.  Only problem now is how  
to interpret the zeroinfl model.  Am I correct in my understanding  
that zeroinfl runs both the poisson and binomial models without  
interactions?  I'm thinking along those lines since no interaction  
terms appear in either model.  If so, how do I check for any  
interactions?

Thanks.

Jim Milks

Graduate Student
Environmental Sciences Ph.D. Program
136 Biological Sciences
Wright State University
3640 Colonel Glenn Hwy
Dayton, OH 45435


On Aug 16, 2007, at 11:19 AM, Achim Zeileis wrote:

 On Thu, 16 Aug 2007, James R. Milks wrote:

 Dr. Stevens,

 I've double-checked my variable lengths.  All of my variables
 (Total.vines, Site, Species, and DBH) came in at 549.  I did correct
 one problem in the data entry that had escaped my previous notice:
 somehow the undergrad who entered all the data managed to make the
 Acer negundo data split into two separate categories while still
 appearing to use the same ACNE abbreviation.  When I made that
 correction and re-ran zicounts, R gave me the following error  
 messages:

 Hmm, I don't know about the error messages in zicounts, but you  
 could try to use the zeroinfl() implementation in package pscl:
   vines.zip - zeroinfl(Total.vines ~ Site + Species + DBH | Site +
 Species + DBH, data = sycamores.1)
 and see whether this produces a similar error.
 Z

  vines.zip-zicounts(resp=Total.vines~.,x=~Site+Species+DBH,z=~Site
 +Species+DBH,distname=ZIP,data=sycamores.1)

 Error in ifelse(y == 0, 1, y/mu) : dim-: dims [product 12] do not
 match the length of object [549]
 In addition: Warning messages:
 1: longer object length is not a multiple of shorter object length
 in: eta + offset
 2: longer object length is not a multiple of shorter object length
 in: y/mu

 In addition, zicounts would not run a normal poisson regression on
 the data, giving me the same error messages as the ZIP regression.
 Doing a poisson regression with glm did not show any error messages.
 However, the glm model with full interactions was still over- 
 dispersed.

 Could the zicounts problem be that the individual sites and species
 had different population sizes?  For instance, Site A had 149 trees,
 site B had 55 trees, site C had 270 trees, and site D had 75 trees.
 The species had similar discrepancies in population sizes, with
 Platanus occidentalis and Acer negundo forming the majority of the
 trees.

 Thanks for your help.

 Jim Milks

 Graduate Student
 Environmental Sciences Ph.D. Program
 136 Biological Sciences
 Wright State University
 3640 Colonel Glenn Hwy
 Dayton, OH 45435



[[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.


Re: [R] Error message when using zero-inflated count regression model in package zicounts

2007-08-14 Thread Hank Stevens
Hi Jim,
Two thoughts come to me, unencumbered by the thought process or  
knowledge of zicounts:
1. Is Poisson really NOT appropriate? (do you have to use zicounts?)
2. Are you 110% certain that all variables are the same length? Would  
NA's interfere?
Cheers,
Hank
On Aug 13, 2007, at 5:10 PM, James Milks wrote:

 I have data on number of vines per tree for ~550 trees.  Over half of
 the trees did not have any vines and the data is fairly skewed
 (median = 0, mean = 1.158, 3rd qu. = 1.000).  I am attempting to
 investigate whether plot location (four sites), species (I'm using
 only the four most common species), or tree dbh has a significant
 influence on the number of vines per tree.  When I attempted to use
 the zicounts function, R gave me the following error message:

 vines.zip-zicounts(resp=Total.vines~.,x=~Site+Species+DBH,z=~Site
 +Species+DBH,distrname=ZIP,data=sycamores.1)
 Error in ifelse(y == 0, 1, y/mu) : dim- : dims [product 12] do not
 match the length of object [549]
 In addition: Warning messages:
 1: longer object length
 is not a multiple of shorter object length in: x[good, ] * w
 2: longer object length
 is not a multiple of shorter object length in: eta + offset
 3: longer object length
 is not a multiple of shorter object length in: y/mu

 I do not know enough about the calculations done in the function to
 interpret the error messages.  Is there a glitch in my data and if
 yes, what is it?

 Thanks for your help.

 Jim Milks

 Graduate Student
 Environmental Sciences Ph.D. Program
 136 Biological Sciences
 Wright State University
 3640 Colonel Glenn Hwy
 Dayton, OH 45435



 [[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.



Dr. Hank Stevens, Associate Professor
338 Pearson Hall
Botany Department
Miami University
Oxford, OH 45056

Office: (513) 529-4206
Lab: (513) 529-4262
FAX: (513) 529-4243
http://www.cas.muohio.edu/~stevenmh/
http://www.muohio.edu/ecology/
http://www.muohio.edu/botany/

E Pluribus Unum

__
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] Error message when using zero-inflated count regression model in package zicounts

2007-08-13 Thread James Milks
I have data on number of vines per tree for ~550 trees.  Over half of  
the trees did not have any vines and the data is fairly skewed  
(median = 0, mean = 1.158, 3rd qu. = 1.000).  I am attempting to  
investigate whether plot location (four sites), species (I'm using  
only the four most common species), or tree dbh has a significant  
influence on the number of vines per tree.  When I attempted to use  
the zicounts function, R gave me the following error message:

  vines.zip-zicounts(resp=Total.vines~.,x=~Site+Species+DBH,z=~Site 
+Species+DBH,distrname=ZIP,data=sycamores.1)
Error in ifelse(y == 0, 1, y/mu) : dim- : dims [product 12] do not  
match the length of object [549]
In addition: Warning messages:
1: longer object length
is not a multiple of shorter object length in: x[good, ] * w
2: longer object length
is not a multiple of shorter object length in: eta + offset
3: longer object length
is not a multiple of shorter object length in: y/mu

I do not know enough about the calculations done in the function to  
interpret the error messages.  Is there a glitch in my data and if  
yes, what is it?

Thanks for your help.

Jim Milks

Graduate Student
Environmental Sciences Ph.D. Program
136 Biological Sciences
Wright State University
3640 Colonel Glenn Hwy
Dayton, OH 45435



[[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] error message: image not found

2007-08-09 Thread Jungeun Song
I have a R version 2.4 and I installed R version 2.5(current version)  
on Mac OS X 10.4.10. I tried dyn.load to load a object code  
compiled from C source. I got the following error message:

Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library '/Users/jusong/Desktop/BPM/R/group.so':
   dlopen(/Users/jusong/Desktop/BPM/R/group.so, 6): Library not  
loaded: /Library/Frameworks/R.framework/Versions/2.4/Resources/lib/ 
libR.dylib
   Referenced from: /Users/jusong/Desktop/BPM/R/group.so
   Reason: image not found


How can I fix this problem?


Best,
Jungeun Song




__
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.


Re: [R] Error message in lmer

2007-08-02 Thread lorenz.gygax
I do not think anyone has answered this.

 I'm trying to run a simple one-way ANCOVA with the lmer 
 function in R  package lme4, but have encountered some
 conceptual problem. The data file MyData.txt is like this:
 
 Group Subj Cov Resp
 A1   3.90   4.05
 A  2   4.05   4.25
 A  3   4.25   3.60
 A  4   3.60   4.20
 A  5   4.20   4.05
 A  6   4.05   3.85
 B  7   3.85   4.15
 B  8   4.15   4.60
 B  9   4.60   4.15
 B  10  4.15   4.40
 B  11  4.40   3.35
 B  12  3.35   3.80
 B  13  3.80   3.90
 
 Since I would like to treat subject (Subj) as a random 
 factor, my one- way ANCOVA (with covariate, Cov) is:

This is a conceptual problem, indeed. To be able to estimate a subject effect, 
you need to have repeated measurements (several lines) per observed subject ...

Cheers, Lorenz

__
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.


Re: [R] Error message in lmer

2007-08-02 Thread Gang Chen
Thanks a lot for the response and explanation, Lorenz! It seems that  
I can run the analysis with 'lm' without treating subject as a random  
factor

lm(Resp ~ Group*Cov, TestData)

Thanks,
Gang

On Aug 2, 2007, at 5:09 AM, [EMAIL PROTECTED]  
[EMAIL PROTECTED] wrote:

 I do not think anyone has answered this.

 I'm trying to run a simple one-way ANCOVA with the lmer
 function in R  package lme4, but have encountered some
 conceptual problem. The data file MyData.txt is like this:

 Group Subj Cov Resp
 A1   3.90   4.05
 A 2   4.05   4.25
 A 3   4.25   3.60
 A 4   3.60   4.20
 A 5   4.20   4.05
 A 6   4.05   3.85
 B 7   3.85   4.15
 B 8   4.15   4.60
 B 9   4.60   4.15
 B 10  4.15   4.40
 B 11  4.40   3.35
 B 12  3.35   3.80
 B 13  3.80   3.90

 Since I would like to treat subject (Subj) as a random
 factor, my one- way ANCOVA (with covariate, Cov) is:
 TestData=read.table(MyData.txt, header=T);
 m1 - lmer(Resp ~ Group * Cov + (1 | Subj), TestData)

 This is a conceptual problem, indeed. To be able to estimate a  
 subject effect, you need to have repeated measurements (several  
 lines) per observed subject ...

 Cheers, Lorenz

__
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] Error message when running lm() with na.action=NULL

2007-07-31 Thread Garavito,Fabian
Hi there,

I am trying to run a liner regression using lm with na.action = NULL, but I
am getting an error message. Any ideas as to why this may be happening?
Please see code and error message below:

 reg_test-lm(yy~.,data=test,na.action=NULL)
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
NA/NaN/Inf in foreign function call (arg 4)


This message and any attachment are confidential and may be privileged or 
otherwise protected  from disclosure. If you are not the intended recipient, 
please telephone or email the sender and delete this message and any attachment 
from your system. If you are not the intended recipient you must not copy this 
message or attachment or disclose the contents to any other person. Nothing 
contained in the attached email shall be regarded as an offer to sell or as a 
solicitation of an offer to buy any  services, funds or products or an 
expression of any opinion or views of the firm or its employees. Nothing 
contained in the attached email shall be deemed to be an advise of, or 
recommendation by, the firm or its employees. No representation is made as to 
accuracy, completeness, reliability or appropriateness of the information 
contained in the attached email. 


[[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.


Re: [R] Error message when running lm() with na.action=NULL

2007-07-31 Thread Garavito,Fabian
Sorry, I forgot to reply to all. See Patrick suggestion below. I also
got another idea from Julian Faraway's book on R

 res - rep(NA,153)
 res[as.numeric(row.names(na.omit(airquality)))] - gl$res

where gl was a regression and airquality the data. 

Thanks,

Fabian

-Original Message-
From: Patrick Burns [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 31, 2007 12:55 PM
To: Garavito,Fabian
Subject: Re: [R] Error message when running lm() with na.action=NULL

Garavito,Fabian wrote:

 I was trying to get a vector of residuals where NA would be assigned 
 to the lm residual vector (in this case reg_test$residuals) whenever 
 NA was present in the sample. For instance,

 Obs fitted  residual
 O1  f1  r1
 O2  f2  r2
 NA  NA  NA

 All I am getting is residual vectors for Non Missing observations 
 (i.e. the dimension of the residual vector could be different from 
 that of the response vector)


Makes sense.  I think you need to do it yourself.  Perhaps something
like (untested):

test.nona - na.omit(test)
mod - lm(y | ., data=test.nona)
allresids - rep(NA, nrow(test))
allresids[-attr(test.nona, 'na.action')] - residuals(mod)

Putting this into a function would probably be the way to go.

 Thank you very much for your help. I used to use R a few years ago, 
 but I have not used it in a long while. Moreover, I had been using SAS 
 in the last year and going back to R has been quite difficult. I was 
 actually looking for a good book in R. Any ideas?


'good' is questionable and not exactly about R, but S Poetry
is at least free.  Venables and Ripley is a common citation.
Peter Dalgaard's book is given good reviews.  There is a book
that is aimed more towards finance (which I'm assuming you
are in) but I've forgotten what it is nor have I seen it.  Searching
Amazon should probably show you a lot of your choices, and
I haven't heard of any books that generate aversion.

Pat

 Fabian


 -Original Message-
 From: Patrick Burns [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 31, 2007 11:39 AM
 To: Garavito,Fabian
 Subject: Re: [R] Error message when running lm() with na.action=NULL

 Doing

 na.action=NULL

 means that you need to get rid of missing values yourself
 from your data, which I'm guessing you haven't done.


 Patrick Burns
 [EMAIL PROTECTED]
 +44 (0)20 8525 0696
 http://www.burns-stat.com
 (home of S Poetry and A Guide for the Unwilling S User)

 Garavito,Fabian wrote:

 Hi there,
 
 I am trying to run a liner regression using lm with na.action = NULL, 
 but I
 am getting an error message. Any ideas as to why this may be happening?
 Please see code and error message below:
 
  
 
 reg_test-lm(yy~.,data=test,na.action=NULL)

 
 Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
 NA/NaN/Inf in foreign function call (arg 4)
 
 
 This message and any attachment are confidential and may be 
 privileged or otherwise protected  from disclosure. If you are not the 
 intended recipient, please telephone or email the sender and delete 
 this message and any attachment from your system. If you are not the 
 intended recipient you must not copy this message or attachment or 
 disclose the contents to any other person. Nothing contained in the 
 attached email shall be regarded as an offer to sell or as a 
 solicitation of an offer to buy any  services, funds or products or an 
 expression of any opinion or views of the firm or its employees. 
 Nothing contained in the attached email shall be deemed to be an 
 advise of, or recommendation by, the firm or its employees. No 
 representation is made as to accuracy, completeness, reliability or 
 appropriateness of the information contained in the attached email.

 
 
[[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.
 
 
  
 



 This message and any attachment are confidential and may be privileged 
 or otherwise protected from disclosure. If you are not the intended 
 recipient, please telephone or email the sender and delete this 
 message and any attachment from your system. If you are not the 
 intended recipient you must not copy this message or attachment or 
 disclose the contents to any other person. Nothing contained in the 
 attached email shall be regarded as an offer to sell or as a 
 solicitation of an offer to buy any services, funds or products or an 
 expression of any opinion or views of the firm or its employees. 
 Nothing contained in the attached email shall be deemed to be an 
 advise of, or recommendation by, the firm or its employees. No 
 representation is made as to accuracy, completeness, reliability or 
 appropriateness of the information contained in the attached email

[R] Error message in lmer

2007-07-30 Thread Gang Chen
I'm trying to run a simple one-way ANCOVA with the lmer function in R  
package lme4, but have encountered some conceptual problem. The data  
file MyData.txt is like this:

Group Subj Cov Resp
A   1   3.90   4.05
A2   4.05   4.25
A3   4.25   3.60
A4   3.60   4.20
A5   4.20   4.05
A6   4.05   3.85
B7   3.85   4.15
B8   4.15   4.60
B9   4.60   4.15
B10  4.15   4.40
B11  4.40   3.35
B12  3.35   3.80
B13  3.80   3.90

Since I would like to treat subject (Subj) as a random factor, my one- 
way ANCOVA (with covariate, Cov) is:

TestData=read.table(MyData.txt, header=T);
m1 - lmer(Resp ~ Group * Cov + (1 | Subj), TestData)

but I got the following error message:

Error in lmerFactorList(formula, mf, fltype) :
 number of levels in grouping factor(s) 'Subj' is too large

Do I have some misconception about the model?

Thank you very much.

Gang

__
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] error message survreg.fit

2007-06-27 Thread Drescher, Michael (MNR)
Dear All,

 

I am doing a parametric survival analysis with:

fit - survreg(Surv(xyz$start, xyz$stop, xyz$event, type=interval) ~
1, dist='loglogistic')

 

At this point I do not want to look into covariates, hence the '~1' as
model formulation. As event types I have exact, interval, and right
censored lifetime data. Everything works fine.

 

For reasons that are not important here now, I wanted to look for the
effects of 'randomly' re-allocating event types to the lifetime data.
However, when I did this (keeping everything else the same), R returned
this error message:

Error in survreg.fit(X, Y, weights, offset, init = init, controlvals =
control,  : NA/NaN/Inf in foreign function call (arg 9)

 

I am puzzled by this error message and can't find anything in the
archives etc.

 

Your input would be greatly appreciated.

 

Best regards, Michael

 

 

Michael Drescher

Ontario Forest Research Institute

Ontario Ministry of Natural Resources

1235 Queen St East

Sault Ste Marie, ON, P6A 2E3

Tel: (705) 946-7406

Fax: (705) 946-2030

 


[[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] error message: only first element in each line of matrix used

2007-06-06 Thread Melanie Ann Harsch
I have a matrix and am trying to write a code to
1. identify all neg values along each line
2. for each neg value I need to identify min(j+3)
3. end with this code: eq[i,j]- ifelse(mat.r[i,j]  (0.5*mat.s[i,j]), 
mat.all[i,j], 0)

This is the code I have so far.  I have tried several different methods but I 
keep getting the same error message that the condition has length 1 and 
only the first element will be used.
Any suggestions?

int - 3
for(i in 1:nrow(mat.all)) {
start.year - min(which(is.na(mat.all[i,])==F  (mat.all[i,]0)))
fin.year - max(which(is.na(mat.all[i,])==F))  
for(j in start.year:fin.year) {
if(mat.all[i,(j-int):(j-1)]0){
  mat.s[i,j] - ifelse((mat.all[i,(j-int):(j-1)])==pmin, mat.all[i,j], 0);
  mat.r [i,j] - which.max((mat.all[i,(j+1):(j+int)])  0) }
  }}

__
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.


Re: [R] error message: only first element in each line of matrix used

2007-06-06 Thread jim holtman
your problem is in the statement:

if(mat.all[i,(j-int):(j-1)]0){

you have multiple values in the comparison and the 'if' statement can only
use a single value.  Do you want the statement to read:

if(all(mat.all[i,(j-int):(j-1)]0)){

which will test for 'all' the comparisons to be true?


On 6/6/07, Melanie Ann Harsch [EMAIL PROTECTED] wrote:

 I have a matrix and am trying to write a code to
 1. identify all neg values along each line
 2. for each neg value I need to identify min(j+3)
 3. end with this code: eq[i,j]- ifelse(mat.r[i,j]  (0.5*mat.s[i,j]),
 mat.all[i,j], 0)

 This is the code I have so far.  I have tried several different methods
 but I
 keep getting the same error message that the condition has length 1 and
 only the first element will be used.
 Any suggestions?

 int - 3
for(i in 1:nrow(mat.all)) {
start.year - min(which(is.na(mat.all[i,])==F  (mat.all[i,]0)))
fin.year - max(which(is.na(mat.all[i,])==F))
for(j in start.year:fin.year) {
if(mat.all[i,(j-int):(j-1)]0){
  mat.s[i,j] - ifelse((mat.all[i,(j-int):(j-1)])==pmin, mat.all[i,j],
 0);
  mat.r [i,j] - which.max((mat.all[i,(j+1):(j+int)])  0)
 }
  }}

 __
 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.




-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

[[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] error message

2007-05-22 Thread karen power
Hi, 

I am trying to install the package exonmap and RMySQL however I keep
getting the following error:

Error in library(pkg, character.only = TRUE) : 
'RMySQL' is not a valid package -- installed  2.0.0?

I have R version 2.4.1 so I know its not a version issue. I deleted and
reinstalled the folders again and the same thing happened. Has anyone
any ideas?

Thanks, 

Karen

__
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.


Re: [R] error message

2007-05-22 Thread Martin Morgan
Hi Karen --

This sounds like a Bioconductor question, and should be sent to the
Bioconductor list.

http://www.bioconductor.org/docs/mailList.html

Likely the complaint is about RMySQL being too old, rather than R. The
idea of 'reinstalling folders' doesn't sound like a good strategy for
updating packages; for Bioconductor see

http://www.bioconductor.org/docs/install-howto.html

likely

 source(http://www.bioconductor.org/biocLite.R;)
 biocLite(exonmap)

does the trick. If not and the problem seems to be RMySQL, then try

 biocLite(RMySQL)

or in a more robust way update all of your currently installed
packages with

 library(Biobase)
 update.packages(repos=biocReposList())

Finally, please provide a more informative subject line and the output
of

 sessionInfo()

so that the community can get a better understanding of the platform
and packages you're using, and hence the source of your problems.

Best,

Martin

karen power [EMAIL PROTECTED] writes:

 Hi, 

 I am trying to install the package exonmap and RMySQL however I keep
 getting the following error:

 Error in library(pkg, character.only = TRUE) : 
 'RMySQL' is not a valid package -- installed  2.0.0?

 I have R version 2.4.1 so I know its not a version issue. I deleted and
 reinstalled the folders again and the same thing happened. Has anyone
 any ideas?

 Thanks, 

 Karen

 __
 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.

-- 
Martin Morgan
Bioconductor / Computational Biology
http://bioconductor.org

__
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.


Re: [R] error message

2007-05-22 Thread Benilton Carvalho
install.packages(RMySQL, dep=T)

should fix it for you.

b

ps: The error says RMySQL is the problem... it is not complaining  
about R itself (although it would not be a bad idea, given that the  
latest R is v 2.5.0, so it would be a better idea to start by  
upgrading your R)

On May 22, 2007, at 11:59 AM, karen power wrote:

 Hi,

 I am trying to install the package exonmap and RMySQL however I keep
 getting the following error:

 Error in library(pkg, character.only = TRUE) :
 'RMySQL' is not a valid package -- installed  2.0.0?

 I have R version 2.4.1 so I know its not a version issue. I deleted  
 and
 reinstalled the folders again and the same thing happened. Has anyone
 any ideas?

 Thanks,

 Karen

__
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] error message when using outer function

2007-03-05 Thread Reinman, Grant
Dear R-users,
I have two sets of code that appear to me to be equivalent, shown below, and
yet I get the error message 

Error in dim(robj) - c(dX, dY) : dim- : dims [product 4] do not match the
length of object [1]

after executing the assignment to logdens2.  Both functions post.a1 and
post.a2 return the same values when run alone and not embedded in the
function outer.  I would appreciate help in understanding the differences
between these two sets of code.  

The code in post.a1 is from Gelman, Carlin, Stern, and Rubin's Bayesian Data
Analysis solutions, problem 3.5.  I was trying to modify this code in
post.a2 when I ran into this error.


post.a1 - function(mu,sd,y){
  ldens - 0
  for (i in 1:length(y)) ldens - ldens + log(dnorm(y[i],mu,sd))
  ldens}
y - c(10,10,12,11,9)
mugrid - c(10,11)
sdgrid - c(1,1.2)
logdens1 - outer (mugrid, sdgrid, post.a1, y)
#*** no error messages ***


post.a2 - function(mu,sd,y)
{
  ldens - sum(log(dnorm(y,mu,sd)))
  ldens
}
y - c(10,10,12,11,9)
mugrid - c(10,11)
sdgrid - c(1,1.2)
logdens2 - outer (mugrid, sdgrid, post.a2, y)
#***error message occurs here ***

Thank You!

Grant Reinman 
e-mail:[EMAIL PROTECTED]

__
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.


Re: [R] error message when using outer function

2007-03-05 Thread Petr Klasterecky
Comments inside.

Reinman, Grant napsal(a):
 Dear R-users,
 I have two sets of code that appear to me to be equivalent, shown below, and
 yet I get the error message 
 
 Error in dim(robj) - c(dX, dY) : dim- : dims [product 4] do not match the
 length of object [1]
 
 after executing the assignment to logdens2.  Both functions post.a1 and
 post.a2 return the same values when run alone and not embedded in the
 function outer.  I would appreciate help in understanding the differences
 between these two sets of code.  
 
 The code in post.a1 is from Gelman, Carlin, Stern, and Rubin's Bayesian Data
 Analysis solutions, problem 3.5.  I was trying to modify this code in
 post.a2 when I ran into this error.
 
 
 post.a1 - function(mu,sd,y){
   ldens - 0
   for (i in 1:length(y)) ldens - ldens + log(dnorm(y[i],mu,sd))
   ldens}
 y - c(10,10,12,11,9)
 mugrid - c(10,11)
 sdgrid - c(1,1.2)
 logdens1 - outer (mugrid, sdgrid, post.a1, y)
 #*** no error messages ***

Actually pretty ugly coding (for a textbook) in my opinion... Try what 
you get with
y - c(10,10,12,11,9)
mugrid - c(10,11)
sdgrid - c(1,1.2)
log(dnorm(y[1],mean=mugrid,sd=sdgrid))

[1] -0.9189385 -1.4484823
This is in a perfect accordance with help(dnorm), which says you are 
allowed to specify a vector of means and SDs. Here 2 values were 
specified, so you obtain 2 density values.

Now, adding a vector of length 2 to a constant:
#not run here# ldens - ldens + log(dnorm(y[i],mu,sd))
is again a vector of length 2.

However, using sum() in your code below gives you just a single number 
and R starts complaining because the dimensions don't match.

Petr

 
 
 post.a2 - function(mu,sd,y)
 {
   ldens - sum(log(dnorm(y,mu,sd)))
   ldens
 }
 y - c(10,10,12,11,9)
 mugrid - c(10,11)
 sdgrid - c(1,1.2)
 logdens2 - outer (mugrid, sdgrid, post.a2, y)
 #***error message occurs here ***
 
 Thank You!
 
 Grant Reinman 
 e-mail:[EMAIL PROTECTED]
 
 __
 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.
 

-- 
Petr Klasterecky
Dept. of Probability and Statistics
Charles University in Prague
Czech Republic

__
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] Error message when building a package

2007-01-29 Thread C. Lillian Yau
I'm trying to build a package. The machine is PowerPC G4 with Mac OS 10.4.8,
and I'm using R2.4.1.

I get R CMD build roots working, and it created roots.tar.gz. But I get
the following message when I run R CMD INSTALL -l ../myrlibrary
roots.tar.gz

==
* Installing *source* package 'roots' ...
** libs
** arch - ppc
gcc-4.0 -arch ppc -std=gnu99
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include/ppc
-I/usr/local/include-fPIC  -g -O2 -c fifrt.c -o fifrt.o
gfortran-4.0 -arch ppc   -fPIC  -g -O2 -c fthrt.f -o fthrt.o
gcc-4.0 -arch ppc -std=gnu99 -dynamiclib -Wl,-macosx_version_min -Wl,10.3
-undefined dynamic_lookup -single_module -multiply_defined suppress
-L/usr/local/lib -o roots.so fifrt.o fthrt.o  -lgfortran -lgcc_s
-lSystemStubs -lmx -lSystem
-L/Library/Frameworks/R.framework/Resources/lib/ppc -lR -dylib_file
libRblas.dylib:/Library/Frameworks/R.framework/Resources/lib/ppc/libRblas.dy
lib
/usr/bin/libtool: unknown option character `m' in: -macosx_version_min
Usage: /usr/bin/libtool -static [-] file [...] [-filelist
listfile[,dirname]] [-arch_only arch] [-sacLT]
Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist
listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name]
[-compatibility_version #] [-current_version #] [-seg1addr 0x#]
[-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table
filename] [-seg_addr_table_filename file_system_path] [-all_load]
[-noall_load]
make: *** [roots.so] Error 1
chmod: /../myrlibrary/roots/libs/ppc/*: No such file or directory
ERROR: compilation failed for package 'roots'
** Removing '/../myrlibrary/roots'


One thing I can see from above is the message /usr/bin/libtool: unknown
option character `m' in: -macosx_version_min, which I got when compiling
other c programs to be called by R.

How can I fix it or get around it? I appreciate your time and help very
much.

Lillian Yau

__
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.


Re: [R] Error message when building a package

2007-01-29 Thread Prof Brian D Ripley
Please update your Xcode tools.  According to

http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html

2.2 or later is needed, and 2.4.1 is current.


On Tue, 30 Jan 2007, C. Lillian Yau wrote:

 I'm trying to build a package. The machine is PowerPC G4 with Mac OS 10.4.8,
 and I'm using R2.4.1.

 I get R CMD build roots working, and it created roots.tar.gz. But I get
 the following message when I run R CMD INSTALL -l ../myrlibrary
 roots.tar.gz

 ==
 * Installing *source* package 'roots' ...
 ** libs
 ** arch - ppc
 gcc-4.0 -arch ppc -std=gnu99
 -I/Library/Frameworks/R.framework/Resources/include
 
-I/Library/Frameworks/R.framework/Resources/include/ppc
 -I/usr/local/include-fPIC  -g -O2 -c fifrt.c -o fifrt.o
 gfortran-4.0 -arch ppc   -fPIC  -g -O2 -c fthrt.f -o fthrt.o
 gcc-4.0 -arch ppc -std=gnu99 -dynamiclib -Wl,-macosx_version_min -Wl,10.3
 -undefined dynamic_lookup -single_module -multiply_defined suppress
 -L/usr/local/lib -o roots.so fifrt.o fthrt.o  -lgfortran -lgcc_s
 -lSystemStubs -lmx -lSystem
 -L/Library/Frameworks/R.framework/Resources/lib/ppc -lR -dylib_file
 libRblas.dylib:/Library/Frameworks/R.framework/Resources/lib/ppc/libRblas.dy
 lib
 /usr/bin/libtool: unknown option character `m' in: -macosx_version_min

[...]

-- 
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

__
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.


Re: [R] Error message using normality test in vars

2006-12-29 Thread Pfaff, Bernhard Dr.

I'm running a vector-time series model with the vars package.  When I 
test the univariate and multivariate normality of the residuals using 
normality(), I get the results, but also this warning

Warning messages:
1: longer object length
 is not a multiple of shorter object length in: b2 - rep(3, 4)
2: longer object length
 is not a multiple of shorter object length in: b2 - rep(3, 4)


What does this mean and do I need to worry about it.


Dear David,

thanks for pointing this out. The warning is caused in the calculation
of the kurtosis in function .jb.multi which is contained in
R/internal.R. The relevant expression should be 'rep(3, K)'. An updated
version of package 'vars' will be submitted in due course. I will ship
you version of the corrected package off list.

Best,
Bernhard
*
Confidentiality Note: The information contained in this mess...{{dropped}}

__
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] Error message using normality test in vars

2006-12-28 Thread David Kaplan
Hi all,

I'm running a vector-time series model with the vars package.  When I 
test the univariate and multivariate normality of the residuals using 
normality(), I get the results, but also this warning

Warning messages:
1: longer object length
 is not a multiple of shorter object length in: b2 - rep(3, 4)
2: longer object length
 is not a multiple of shorter object length in: b2 - rep(3, 4)


What does this mean and do I need to worry about it.

Thanks in advance,

David


-- 
===
David Kaplan, Ph.D.
Professor
Department of Educational Psychology
University of Wisconsin - Madison
Educational Sciences, Room 1061
1025 W. Johnson Street
Madison, WI 53706

email: [EMAIL PROTECTED]
Web:   http://www.education.wisc.edu/edpsych/facstaff/kaplan/kaplan.htm
Phone: 608-262-0836
Fax:   608-262-0843

__
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] Error Message saying .Call(R_lazyLoadDBfetch, etc.

2006-11-24 Thread Jacques VESLOT
Hi,

I got the following error message when running a function of mine doing 
intensive computations:
Erreur dans .Call(R_lazyLoadDBfetch, key, file, compressed, hook, PACKAGE = 
base) :
 référence d'argument par défaut récursive

I haven't found neither where the problem lies nor what could be recursive.

Besides, I wonder whether it might or not be a problem of memory size.

Could you please give me any suggestion on how to interpret this message?

Thanks in advance,

jacques

---
Jacques VESLOT

CNRS UMR 8090
I.B.L (2ème étage)
1 rue du Professeur Calmette
B.P. 245
59019 Lille Cedex

Tel : 33 (0)3.20.87.10.44
Fax : 33 (0)3.20.87.10.31

http://www-good.ibl.fr

__
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.


Re: [R] Error Message saying .Call(R_lazyLoadDBfetch, etc.

2006-11-24 Thread Peter Dalgaard
Jacques VESLOT [EMAIL PROTECTED] writes:

 Hi,
 
 I got the following error message when running a function of mine doing 
 intensive computations:
 Erreur dans .Call(R_lazyLoadDBfetch, key, file, compressed, hook, PACKAGE = 
 base) :
  référence d'argument par défaut récursive
 
 I haven't found neither where the problem lies nor what could be recursive.
 
 Besides, I wonder whether it might or not be a problem of memory size.
 
 Could you please give me any suggestion on how to interpret this message?

The prototypical situation is this

 f-function(a=a)a
 f(2)
[1] 2
 f()
Error in f() : recursive default argument reference

The default for argument a ends up needing the value of a. This can
also happens more indirectly when multiple arguments refer to
eachother. 

BTW: Is that error message proper French? Should it not be

référence récursive d'argument par défaut 

or so.

-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
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.


Re: [R] error message for row names

2006-11-08 Thread Prof Brian Ripley
On Wed, 8 Nov 2006, Taka Matzmoto wrote:

 Hi R users -

 I got an error message when reading in a saved file (a list structure)

 dget(REPLICATION001)
 Error in attributes(.Data) - c(attributes(.Data), attrib) :
row names must be 'character' or 'integer', not 'double'

 I don't need row names and didn't even specify row names when I saved the
 file. What do I need to do for reading in the file successfully?

You haven't told us how you wrote the file, but my guess is that you used 
dput().  If so, consult the help page and note it says

  Deparsing an object is difficult, and not always possible.  With
  the default 'control = c(showAttributes)', 'dput()' attempts to
  deparse in a way that is readable, but for more complex or unusual
  objects, not likely to be parsed as identical to the original.
  Use 'control = all'  for the most complete deparsing; use
  'control = NULL' for the simplest deparsing, not even including
  attributes.

so your problem is described right there on the help page.

And please don't sent multiple messages on the same topic: your second 
message is about an inaccurate dput of the file, and not about an actual 
object in R.

-- 
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

__
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.


Re: [R] Error Message Documentation

2006-09-17 Thread Uwe Ligges
cjkogan111 wrote:
 Hello,
 I am new to R, and trying to work with it. I have a couple of quick
 questions. First, I made a program and got the following error message.
 --
 Error in if (DatMdFile$Time.Value[NmRecord]  VBinTimesMinTop[NmCounter]) {
 : 
 missing value where TRUE/FALSE needed
 In addition: Warning message:
  not meaningful for factors in: Ops.factor(DatMdFile$Time.Value[NmRecord],
 VBinTimesMinTop[NmCounter]) 
 -
 I noticed that one of the values had decimal places, while the other didn't,
 so the comparison would be 11.00  10
 I don't know if that might have anything to do with my problem.

Well, not really the decimal places, but the data type.

 Anyway, I don't have much idea what the error means, and I don't know how to
 check what data type the different vectors are.

So time to start looking at the documentation?
class() is your friend, you might also want to try str().

 I was wondering if anyone could help me out, and also, I was wondering if
 there is any error documentation (stuff that tells what the error means.)

Probably one of your objects is a factor rather than a numeric value.


 Thanks!
 - cjkogan111

ujligges1234

__
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] Error Message Documentation

2006-09-16 Thread cjkogan111

Hello,
I am new to R, and trying to work with it. I have a couple of quick
questions. First, I made a program and got the following error message.
--
Error in if (DatMdFile$Time.Value[NmRecord]  VBinTimesMinTop[NmCounter]) {
: 
missing value where TRUE/FALSE needed
In addition: Warning message:
 not meaningful for factors in: Ops.factor(DatMdFile$Time.Value[NmRecord],
VBinTimesMinTop[NmCounter]) 
-
I noticed that one of the values had decimal places, while the other didn't,
so the comparison would be 11.00  10
I don't know if that might have anything to do with my problem.
Anyway, I don't have much idea what the error means, and I don't know how to
check what data type the different vectors are.

I was wondering if anyone could help me out, and also, I was wondering if
there is any error documentation (stuff that tells what the error means.)

Thanks!
- cjkogan111
-- 
View this message in context: 
http://www.nabble.com/Error-Message-Documentation-tf2283899.html#a6344607
Sent from the R help forum at Nabble.com.

__
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.


Re: [R] error message from lm.ridge() in MASS ***package***

2006-08-24 Thread Martin Maechler
 jz7 == jz7  [EMAIL PROTECTED]
 on Tue, 22 Aug 2006 17:10:42 -0400 (EDT) writes:

jz7 Dear all,
jz7 I got a wierd problem when using lm.ridge() in MASS library. 

there is MASS the book and MASS the package,
and there is even a MASS library (namely the file MASS.so or
MASS.dll depending on your platform) but you are really talking
about the MASS *package* !

jz7 When my X matrix has few columns, there is no
jz7 problem. But when my X matrix gets larger (over 1000
jz7 columns), I got the following error:

and where is the selfcontained reproducible code which we ask
you for, explicitly in the posting guide and at the footer of
every R-help message ???



jz7 Error in Xs$v %*% a : non-conformable arguments
jz7 In addition: Warning messages:
jz7 1: longer object length
jz7 is not a multiple of shorter object length in: d^2 + rep(lambda,
jz7 rep(p, k))
jz7 2: longer object length
jz7 is not a multiple of shorter object length in: drop(d * rhs)/div

jz7 The R code I use for the calculation is lm.ridge( y ~ 
x,lambda=seq(1,15,1)).

jz7 Please advice.

jz7 Thanks a lot!
jz7 Jeny

__
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] error message from lm.ridge() in MASS library

2006-08-22 Thread jz7
Dear all,

I got a wierd problem when using lm.ridge() in MASS library. When my X
matrix has few columns, there is no problem. But when my X matrix gets
larger (over 1000 columns),  I got the following error:

Error in Xs$v %*% a : non-conformable arguments
In addition: Warning messages:
1: longer object length
is not a multiple of shorter object length in: d^2 + rep(lambda,
rep(p, k))
2: longer object length
is not a multiple of shorter object length in: drop(d * rhs)/div

The R code I use for the calculation is lm.ridge( y ~ x,lambda=seq(1,15,1)).

Please advice.

Thanks a lot!
Jeny

__
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.


Re: [R] Error message when using optim

2006-08-09 Thread Prof Brian Ripley
(Subject changed to something less perjorative.  This is not `optim 
error'.)

On Wed, 9 Aug 2006, Frank Black wrote:

 Dear all,
 
 There have been one or two questions posted to the list regarding the optim 
 error non-finite finite-difference value [4].  The error apparently means 
 that the 4th element of the gradient is non-finite.

(Without an example of the optim usage, we have little to go on.  This 
does not occur in the default method, so we don't even know which method 
was asked for.  Please do study the posting guide: we ask to information 
for good reasons.)

It means that the finite-difference approximation to the gradient is 
non-finite (as it says).  Most likely this occurs when the user-supplied 
function is returning Inf (so the finite difference is Inf - Inf) or
returning NA/NaN.

 My question is what part(s) of my program should I fiddle with in an 
 attempt to fix it?  Starting values?  Something in the log-likelihood 
 itself?  Perhaps the data (which is generated)?  Any thoughts would be 
 greatly appreciated.

If the function you are optimizing never returns Inf or NA/NaN, the 
message will not occur.  Nor will it occur if you supply a gradient 
function.

-- 
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

__
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] error message

2006-05-23 Thread gabriela escati peñaloza
Hello,
we work in nlme, with R version 2.2.1.
We ran the follwing sentence, a growth function,

 formula(my data.gd)
L.gd ~ Largo | ID

 Rich- function(Largo, Linf, K, t0, m) 
Linf *(1-exp(-K(edad-t0)))^(1/(1-m))

 Rich.nlme - nlme(Largo ~ Rich(edad, Linf, K, t0,
m),
+ data = L.gd,
+ fixed = Linf + K +t0 +m~ 1,
+   start = list(fixed = c(800, 0.3,-0.5,0.3)))


And the program gave us this error message,

Error: Singularity in backsolve at level 0, block 1
In addition: Warning messages:
1: NaNs produced in: log(x) 
2: NaNs produced in: log(x)
 
Does anyone know what this means?

We would apreciate if you could point us to a
reference


Lic. Gabriela Escati Peñaloza
Biología y Manejo de Recursos Acuáticos
Centro Nacional Patagónico(CENPAT). 
CONICET
Bvd. Brown s/nº.
(U9120ACV)Pto. Madryn 
Chubut
Argentina

Tel: 54-2965/451301/451024/451375/45401 (Int:277)
Fax: 54-29657451543



_ 
Horóscopos, Salud y belleza, Chistes, Consejos de amor: 
el contenido más divertido para tu celular está en Yahoo! Móvil. 
Obtenelo en http://movil.yahoo.com.ar

__
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


Re: [R] Error message with nmds

2006-05-17 Thread Jari Oksanen
On Tue, 2006-05-16 at 13:25 -0700, Jonathan Hughes wrote:
 I am trying to apply nmds to a data matrix but I receive the  
 following error message:
 
 Error in isoMDS(dis, y = y, k = k, maxit = maxit) :
   zero or negative distance between objects 5 and 7
 
 The data are in a vegetation cover-class matrix (species in columns,  
 plots in rows, classes 1-8 with lots of zero values) converted to a  
 dissimilarity matrix (bray curtis).
 
 I assumed that objects 5 and 7 refer to rows of my original data; and  
 they do have the same species with the same cover classes.  I deleted  
 one of these rows but I received the same error message with a rerun  
 of nmds.  As it turns out, the new rows 5 and 7 are the same.  How do  
 I avoid this problem?

Jonathan, this is a FAQ in the proper sense of the word: this is
frequently asked. Last thread was on April, 2006. See

https://stat.ethz.ch/pipermail/r-help/2006-April/092598.html

and answers. You may also use RSiteSearch with keyword isoMDS to find
other (and older) threads.

cheers, jari oksanen
-- 
Jari Oksanen -- Dept Biology, Univ Oulu, 90014 Oulu, Finland
email [EMAIL PROTECTED], homepage http://cc.oulu.fi/~jarioksa/

__
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


[R] Error message with nmds

2006-05-16 Thread Jonathan Hughes
I am trying to apply nmds to a data matrix but I receive the  
following error message:

Error in isoMDS(dis, y = y, k = k, maxit = maxit) :
zero or negative distance between objects 5 and 7

The data are in a vegetation cover-class matrix (species in columns,  
plots in rows, classes 1-8 with lots of zero values) converted to a  
dissimilarity matrix (bray curtis).

I assumed that objects 5 and 7 refer to rows of my original data; and  
they do have the same species with the same cover classes.  I deleted  
one of these rows but I received the same error message with a rerun  
of nmds.  As it turns out, the new rows 5 and 7 are the same.  How do  
I avoid this problem?

Any advice for this neophyte would be greatly appreciated.  Thanks!

__
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


Re: [R] error message explanation for lmer

2006-04-13 Thread Spencer Graves
  I don't know how to get that particular error message from lmer, but 
I can guess that it might occur when you are trying to estimate more 
parameters than the data will support.

  To overcome this, I would try the following:

  First, have you tried experimenting with different models and / or 
data sets to create very simple example examples, one that gives the 
error you don't understand and another slighly different that seems to 
work fine?  That may be the easiest and most sensible thing to do.  If 
you get that far and still can't figure it out, I suggest you send that 
simple, self-contained, reproducible example to this list.  This is 
something suggested in the posting guide! 
(www.R-project.org/posting-guide.html).  It can help you find the 
problem and failing that can make it easier for someone else to 
understand your problem.  Without that, I'm just guessing, and I know 
that some frequent contributors to this list are less likely to respond 
to a question without something like that.

  Beyond this, I could make other suggestions.  For example, have you 
tried method = PQL and AGQ?  If both of these work, then I would 
think there might be something strange with Laplace at least for this 
example.

  Also, I don't know what family you are using, but if it's normal, 
have you tried running the same model using lme in library(nlme)?  (At 
one time, I think you may have had to quit R and restart in changing 
from lme4 to nlme or vice versa, I don't remember now, but I always do 
that to avoid potential conflicts between the two packages.)  If it's 
NOT normal, I might still try the same model in lme ignoring the 
nonnormality.  If you get similar convergence problems or if intervals 
dies on you or give extremely wide confidence intervals, that suggests 
you may be trying to estimate too many effects.

  Is it convenient to make tables to find out how many combinations of 
factors you have?  If you slice things too thinly, the model can't be 
estimated;  you can get convergence problems from that.

  If it were me, I might try to make a local copy of the code and walk 
through it line by line using debug until I figured out the problem. 
However, this might not be feasible if you're not familiar enough with 
the algorithm to almost write your own code.

  hope this helps,
  spencer graves

Bill Shipley wrote:

 I am getting the following error message using the lmer function for mixed
 models with method=Laplace:
  
 nlminb returned message false convergence (8) in: LMEopt(x=mer,value=cv)
  
 Could anyone explain what this means, and how I might overcome (or track
 down) the problem?
  
 
 Bill Shipley
 
  
 
  
 
   [[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

__
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


[R] error message explanation for lmer

2006-04-11 Thread Andreas Svensson
I got strange error messages when I had other packages opened the same 
time as lme4 (e.g. as nlme).
Try to not have other libraries loaded.

/A

__
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


[R] error message explanation for lmer

2006-04-10 Thread Bill Shipley
I am getting the following error message using the lmer function for mixed
models with method=Laplace:
 
nlminb returned message false convergence (8) in: LMEopt(x=mer,value=cv)
 
Could anyone explain what this means, and how I might overcome (or track
down) the problem?
 

Bill Shipley

 

 

[[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


Re: [R] error message

2006-03-28 Thread Prof Brian Ripley
Yes, the author of the message does :)

Your fit is exactly collinear.  From ?predict.lm

  If the fit is rank-deficient, some of the columns of the design
  matrix will have been dropped.  Prediction from such a fit only
  makes sense if 'newdata' is contained in the same subspace as the
  original data.  That cannot be checked accurately, so a warning is
  issued.

(in fact predict.lm is being called here.)

On Tue, 28 Mar 2006, stephenc wrote:

 Hi

 Does anyone know what this means:


 glm.model = glm(formula = as.factor(nextDay) ~ ., family=binomial,
 data=spi[1:1000,])
 pred - predict(glm.model, spi[1001:1250,-9], type=response)
 Warning message:
 prediction from a rank-deficient fit may be misleading in:
 predict.lm(object, newdata, se.fit, scale = 1, type = ifelse(type ==

 9 is my determinant and I still get this message even when I remove the
 9.

 Stephen


   [[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


-- 
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

__
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


[R] error message

2006-03-27 Thread stephenc
Hi
 
Does anyone know what this means:
 
 
 glm.model = glm(formula = as.factor(nextDay) ~ ., family=binomial,
data=spi[1:1000,])
 pred - predict(glm.model, spi[1001:1250,-9], type=response)
Warning message: 
prediction from a rank-deficient fit may be misleading in:
predict.lm(object, newdata, se.fit, scale = 1, type = ifelse(type ==  
 
9 is my determinant and I still get this message even when I remove the
9.
 
Stephen
 

[[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


[R] error message with stats package fx cor R aqua v1.14

2006-03-21 Thread Betty Gilbert
Hello,
Sorry if this is somewhere in the archives but i couldn't find it. I 
am using the funtion cor() and inputting a large matrix with a column 
of 0, for which i get NA's for. I'm looking for a way to overcome 
that divide by 0 error btw but my real issue is this:
I specify the method as pearson but the error messages always say kendall
ex)
  read.csv(ncatest.csv, header = FALSE, sep = ,, dec=.)-ncatest
  ncatest- ncatest[,-1]
   rownames(ncatest2)- ncatest[,1]
  ncatest2-as.matrix(ncatest2)
   dim(ncatest2)
[1] 1048211
  cornca-cor(ncatest2, method=pearson)
Warning message:
the standard deviation is zero in: cor(x, y, na.method, method == kendall)


I would like to confirm that i am using the metric I specified and 
that its not defaulting to kendall for some weird reason.
Thanks for any assistance.
Sincerely,
betty
-- 
[[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


Re: [R] Error Message from Variogram.lme Example

2006-03-14 Thread Prof Brian Ripley
On Tue, 14 Mar 2006, Prof Brian Ripley wrote:

 So this is most likely a bug in package nlme.  However, we need a
 reproducible example to be able to do anything about it, and without even
 the traceback() we cannot be sure that it is in nlme.

 Please follow the bug-reporting procedure.

It does seem to be a bug in Variogram.lme (assuming this is the BodyWeight 
dataset from package nlme).  The lines

 val - na.omit(val)
 val$n.pairs - as.vector(table(na.omit(cutDist)))

need to be interchanged since one bin has a zero count and gets omitted.



 On Mon, 13 Mar 2006, Rick Bilonick wrote:

 When I try to run the example from Variogram with an lme object, I get
 an error (although summary works):

 R : Copyright 2005, The R Foundation for Statistical Computing
 Version 2.2.1  (2005-12-20 r36812)
 ISBN 3-900051-07-0
 ...

  fm1 - lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat)
 Error: couldn't find function lme
  Variogram(fm1, form = ~ Time | Rat, nint = 10, robust = TRUE)
 Error: couldn't find function Variogram
 library(nlme)
  fm1 - lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat)
  Variogram(fm1, form = ~ Time | Rat, nint = 10, robust = TRUE)
 Error in $-.data.frame(`*tmp*`, n.pairs, value = c(160, 0, 160,
 16,  :
replacement has 10 rows, data has 9

 [...]

Information on package 'nlme'

 Description:

 Package:   nlme
 Version:   3.1-68.1
 Date:  2006-01-05




-- 
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

__
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


[R] Error Message from Variogram.lme Example

2006-03-13 Thread Rick Bilonick
When I try to run the example from Variogram with an lme object, I get
an error (although summary works):

R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.2.1  (2005-12-20 r36812)
ISBN 3-900051-07-0
...

  fm1 - lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat)
Error: couldn't find function lme
  Variogram(fm1, form = ~ Time | Rat, nint = 10, robust = TRUE)
Error: couldn't find function Variogram
 library(nlme)
  fm1 - lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat)
  Variogram(fm1, form = ~ Time | Rat, nint = 10, robust = TRUE)
Error in $-.data.frame(`*tmp*`, n.pairs, value = c(160, 0, 160,
16,  :
replacement has 10 rows, data has 9


 summary(fm1)
Linear mixed-effects model fit by REML
 Data: BodyWeight
   AIC  BIClogLik
  1171.720 1203.078 -575.8599

Random effects:
 Formula: ~Time | Rat
 Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 36.9390723 (Intr)
Time 0.2484113 -0.149
Residual 4.4436052

Fixed effects: weight ~ Time * Diet
Value Std.Error  DF   t-value p-value
(Intercept) 251.65165 13.094025 157 19.218816  0.
Time  0.35964  0.091140 157  3.946019  0.0001
Diet2   200.66549 22.679516  13  8.847873  0.
Diet3   252.07168 22.679516  13 11.114509  0.
Time:Diet20.60584  0.157859 157  3.837858  0.0002
Time:Diet30.29834  0.157859 157  1.889903  0.0606
 Correlation:
   (Intr) Time   Diet2  Diet3  Tm:Dt2
Time   -0.160
Diet2  -0.577  0.092
Diet3  -0.577  0.092  0.333
Time:Diet2  0.092 -0.577 -0.160 -0.053
Time:Diet3  0.092 -0.577 -0.053 -0.160  0.333

Standardized Within-Group Residuals:
Min  Q1 Med  Q3 Max
-3.25558796 -0.42196874  0.08229384  0.59933559  2.78994477

Number of Observations: 176
Number of Groups: 16


Information on package 'nlme'

Description:

Package:   nlme
Version:   3.1-68.1
Date:  2006-01-05


Rick B.

__
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


Re: [R] Error Message from Variogram.lme Example

2006-03-13 Thread Prof Brian Ripley
So this is most likely a bug in package nlme.  However, we need a 
reproducible example to be able to do anything about it, and without even 
the traceback() we cannot be sure that it is in nlme.

Please follow the bug-reporting procedure.


On Mon, 13 Mar 2006, Rick Bilonick wrote:

 When I try to run the example from Variogram with an lme object, I get
 an error (although summary works):

 R : Copyright 2005, The R Foundation for Statistical Computing
 Version 2.2.1  (2005-12-20 r36812)
 ISBN 3-900051-07-0
 ...

  fm1 - lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat)
 Error: couldn't find function lme
  Variogram(fm1, form = ~ Time | Rat, nint = 10, robust = TRUE)
 Error: couldn't find function Variogram
 library(nlme)
  fm1 - lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat)
  Variogram(fm1, form = ~ Time | Rat, nint = 10, robust = TRUE)
 Error in $-.data.frame(`*tmp*`, n.pairs, value = c(160, 0, 160,
 16,  :
replacement has 10 rows, data has 9

[...]

Information on package 'nlme'

 Description:

 Package:   nlme
 Version:   3.1-68.1
 Date:  2006-01-05


-- 
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

__
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


Re: [R] Error Message from Variogram.lme Example

2006-03-13 Thread Dieter Menne
Rick Bilonick rab45+ at pitt.edu writes:

 
 When I try to run the example from Variogram with an lme object, I get
 an error (although summary works):
 
  library(nlme)
   fm1 - lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat)
   Variogram(fm1, form = ~ Time | Rat, nint = 10, robust = TRUE)
 Error in $-.data.frame(`*tmp*`, n.pairs, value = c(160, 0, 160,
 16,  :
 replacement has 10 rows, data has 9
 

The example is does not run, but if you leave out nint=10 (giving default 
nint=20), or use any number nint =12, it works.

The example has a don't run in the docs, but it could easily be cleaned up. 
If it should serve as documentation of the error message, it's a bit confusing.

Dieter

__
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


Re: [R] error message in cph

2006-03-11 Thread Uwe Ligges
[EMAIL PROTECTED] wrote:
 Hi, List,
 
 I am using function 'cph' in package 'Design'. I have run into this error 
 message but could not find documentation after looking for a long time. 
 Could someone help me out? What kind of problem it is in my data set and 
 how to fix it?
 
 Thanks a lot!
 
 Auston
 
 
 Error in fitter(X, Y, strata = Strata, offset = offset, weights = weights, 
  :NA/NaN/Inf in foreign function call (arg 6)


Please try again with recent versions of R and Design.
Please specify a *reproducible* example, otherwise we cannot help that much.
If this is a bug in a package, please report to the package maintainer.

Uwe Ligges


 platform i686-pc-linux-gnu
 arch i686
 os   linux-gnu
 system   i686, linux-gnu
 status
 major2
 minor2.0
 year 2005
 month10
 day  06
 svn rev  35749
 language R
 
 Auston Wei
 Statistical Analyst
 Department of Biostatistics and Applied Mathematics
 The University of Texas MD Anderson Cancer Center
 Tel: 713-563-4281
 Email: [EMAIL PROTECTED]
   [[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

__
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


[R] error message in cph

2006-03-10 Thread WWei
Hi, List,

I am using function 'cph' in package 'Design'. I have run into this error 
message but could not find documentation after looking for a long time. 
Could someone help me out? What kind of problem it is in my data set and 
how to fix it?

Thanks a lot!

Auston


Error in fitter(X, Y, strata = Strata, offset = offset, weights = weights, 
 :NA/NaN/Inf in foreign function call (arg 6)

platform i686-pc-linux-gnu
arch i686
os   linux-gnu
system   i686, linux-gnu
status
major2
minor2.0
year 2005
month10
day  06
svn rev  35749
language R

Auston Wei
Statistical Analyst
Department of Biostatistics and Applied Mathematics
The University of Texas MD Anderson Cancer Center
Tel: 713-563-4281
Email: [EMAIL PROTECTED]
[[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


[R] error message in cox regression cph()

2006-02-02 Thread May, Roel
Hi,
 
I have been trying to get the cph() function of the Design package to work but 
get an error message I don't understand:
 
Error in if (!length(fname) || !any(fname == zname)) { : 
missing value where TRUE/FALSE needed

I have tried the same for a dummy dataset I made, and than it seems to work 
fine. However, it doesn't do it for my own data. Does anyone have a clue as to 
what this message means, whether I have made a mistake somewhere(although it 
seems ok to me?) and especially how to solve this problem. I know I could have 
used coxph() instead, but I'd like to predict the outcome on another dataset 
and coxph() does not allow for interaction terms...
 
I hope anyone can help me here. Underneath is the code I used for my data, if 
it's of any use...
 
Thanks, cheers Roel
 
Roel May
NINA, Norway
modeldata - as.data.frame(modeldata)

survchoice-Surv(2-modeldata$USED,is.element(modeldata$USED,1))

d - 
datadist(modeldata$ID,modeldata$ASP_NW,modeldata$ALT,modeldata$SLOPE,modeldata$PLACEMENT,modeldata$DTL,modeldata$TRACK,modeldata$PRIVATE,modeldata$BUSH,modeldata$ROCK,modeldata$GRASS,modeldata$WATER,modeldata$RUGGED,modeldata$CABIN,data=modeldata)

options(datadist=d)

options(contrasts=c(contr.treatment,contr.treatment))

interactmodel - 
cph(survchoice~(ASP_NW+RUGGED+SLOPE+GRASS:PLACEMENT+PRIVATE+BUSH:ROCK+RUGGED:ROCK+DTL)+strat(ID),data=modeldata,method=breslow,y=TRUE,x=TRUE,surv=TRUE)


[[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


Re: [R] error message in cox regression cph()

2006-02-02 Thread Frank E Harrell Jr
May, Roel wrote:
 Hi,
  
 I have been trying to get the cph() function of the Design package to work 
 but get an error message I don't understand:
  
 Error in if (!length(fname) || !any(fname == zname)) { : 
 missing value where TRUE/FALSE needed
 
 I have tried the same for a dummy dataset I made, and than it seems to work 
 fine. However, it doesn't do it for my own data. Does anyone have a clue as 
 to what this message means, whether I have made a mistake somewhere(although 
 it seems ok to me?) and especially how to solve this problem. I know I could 
 have used coxph() instead, but I'd like to predict the outcome on another 
 dataset and coxph() does not allow for interaction terms...
  
 I hope anyone can help me here. Underneath is the code I used for my data, if 
 it's of any use...
  
 Thanks, cheers Roel
  
 Roel May
 NINA, Norway
 modeldata - as.data.frame(modeldata)
 
 survchoice-Surv(2-modeldata$USED,is.element(modeldata$USED,1))


 
 d - 
 datadist(modeldata$ID,modeldata$ASP_NW,modeldata$ALT,modeldata$SLOPE,modeldata$PLACEMENT,modeldata$DTL,modeldata$TRACK,modeldata$PRIVATE,modeldata$BUSH,modeldata$ROCK,modeldata$GRASS,modeldata$WATER,modeldata$RUGGED,modeldata$CABIN,data=modeldata)


Don't use $ in input arguments to datadist.  Use the whole data frame or 
use with( ).


 options(datadist=d)
 
 options(contrasts=c(contr.treatment,contr.treatment))

Remove.  This is the default.

 
 interactmodel - 
 cph(survchoice~(ASP_NW+RUGGED+SLOPE+GRASS:PLACEMENT+PRIVATE+BUSH:ROCK+RUGGED:ROCK+DTL)+strat(ID),data=modeldata,method=breslow,y=TRUE,x=TRUE,surv=TRUE)

Use * for interactions and to make sure your model follows the hierarchy 
principle.

Next time please also give the version of Design you are using.

Frank

 
 
   [[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
 


-- 
Frank E Harrell Jr   Professor and Chair   School of Medicine
  Department of Biostatistics   Vanderbilt University

__
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


[R] error message from building R in Mac

2005-12-07 Thread Fang-Yi Chiou
Following the instruction in R website and downloading gcc and g77, I  
am trying to configure and build R in my Mac laptop, but got some  
error message that I do not know how to resolve.  Do any of you know  
how to solve this problem?

After type  ./configure, I got the following message.

R is now configured for powerpc-apple-darwin8.3.0

   Source directory:  .
   Installation directory:/Library/Frameworks

   C compiler:gcc  -g -O2
   C++ compiler:  g++  -g -O2
   Fortran compiler:  gfortran  -g -O2

   Interfaces supported:  X11, aqua, tcltk
   External libraries:readline, BLAS(generic), LAPACK(in blas)
   Additional capabilities:   iconv, MBCS, NLS
   Options enabled:   framework, R profiling

   Recommended packages:  yes

But after typing make, I got the following error message.

make[1]: Nothing to be done for `R'.
make[1]: Nothing to be done for `R'.
make[2]: Nothing to be done for `R'.
creating src/scripts/R.fe
config.status: creating src/include/config.h
config.status: src/include/config.h is unchanged
Rmath.h is unchanged
make[3]: Nothing to be done for `R'.
make[4]: `libbz2.a' is up to date.
make[4]: `libpcre.a' is up to date.
make[4]: `libz.a' is up to date.
make[3]: Nothing to be done for `R'.
make[3]: `stamp-lo' is up to date.
make[3]: `stamp-lo' is up to date.
make[3]: `stamp-lo' is up to date.
/Users/fang-yichiou/tmp/R-2.2.0/lib/libR.dylib is unchanged
/Users/fang-yichiou/tmp/R-2.2.0/bin/exec/R is unchanged
make[4]: `R_X11.so' is up to date.
make[4]: `internet.so' is up to date.
make[4]: `lapack.so' is up to date.
make[4]: `vfonts.so' is up to date.
building system startup profile
building package 'base'
all.R is unchanged
building package 'tools'
all.R is unchanged
make[5]: `Makedeps' is up to date.
../../../../library/tools/libs/tools.so is unchanged
building package 'utils'
all.R is unchanged
building package 'grDevices'
all.R is unchanged
../../../library/grDevices/R/grDevices is unchanged
make[5]: `Makedeps' is up to date.
../../../../library/grDevices/libs/grDevices.so is unchanged
Error in solve.default(rgb) : lapack routines cannot be loaded
In addition: Warning message:
unable to load shared library '/Users/fang-yichiou/tmp/R-2.2.0/ 
modules/lapack.so':
   dlopen(/Users/fang-yichiou/tmp/R-2.2.0/modules/lapack.so, 6):  
Symbol not found: _rcblas_zdotc_sub__
   Referenced from: /Users/fang-yichiou/tmp/R-2.2.0/modules/lapack.so
   Expected in: flat namespace
Error: unable to load R code in package 'grDevices'
Execution halted
make[3]: *** [all] Error 1
make[2]: *** [R] Error 1
make[1]: *** [R] Error 1
make: *** [R] Error 1


Thanks for your advice in advance.

Fang-Yi

__
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


[R] Error message in polr

2005-11-12 Thread german . lopez
Dear members of the list,
  I'm fitting ordinal regressions using polr, and in some models I 
get the error copied below. Dependent variable is an ordered factor 
of bird abundance categories, and predictors are continuous habitat 
variables.

 ro6 - polr(formula = abun ~ InOmbrot + Oliva.OC + ToCultAr + 
DivCulArb + AltitMax + COORXY)
 summary(ro6)

Re-fitting to get Hessian

Error in La.svd(x, nu, nv, method) : error code 8 from Lapack 
routine dgesdd
In addition: Warning messages: 
1: NaNs produced in: dlogis(x, location, scale, log) 
2: NaNs produced in: dlogis(x, location, scale, log) 

But if I call for the ro6 object I get the coefficients but 
without standard errors:

 ro6
Call:
polr(formula = abun ~ InOmbrot + Oliva.OC + ToCultAr + DivCulArb + 
AltitMax + COORXY)

Coefficients:
 InOmbrot  Oliva.OC  ToCultAr DivCulArb  
AltitMax 
-2.721242e-01  2.590153e-02  2.098157e-02  7.908437e-01  2.088895e-
03 
   COORXY 
 5.937940e-06 

Intercepts:
 0|1  1|2  2|3 
18.16425 18.97070 20.94103 

Residual Deviance: 817.667 
AIC: 835.667 

It seems that the error is related to the number of predictors 
involved since if I use a lower number, say five predictors, polr 
does not produce this error message in summary.
I have been looking at previous messages concerning errors in polr 
but I haven't found the solution. I would ackowledge very much any 
help.

  Germán López

__
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


Re: [R] Error message: The following object(s) are masked

2005-11-04 Thread Uwe Ligges
Ettinger, Nicholas wrote:

 Hello!
 
 First time posting here:
 
 Here is my code:
 
 x - c(1:22)
 finaloutput=cidrm=NULL
 finaldiversityoutput=diversitym=NULL
 
 diversityinfo=read.table(Diversity_info.txt, header=T, sep=\t,
 row.names=NULL)
 attach(diversityinfo)
 diversitynr=nrow(diversityinfo)
 diversitytemp - matrix(0,nrow=diversitynr,ncol=1)
 
 for(j in 1:length(x))
 {
 diversitym=read.table(paste(paste(Div-Chr,x[j],
 sep=),_corr.txt,sep=), header=T, sep=\t, row.names=NULL)
 attach(diversitym)
 diversitytemp - cbind(diversitytemp,diversitym)
 print(paste(paste(Diversity-Chrom,x[j], sep=),.txt,sep=))
 print(dim(diversitytemp))
 }
 
 I am essentially trying to combine several tab-delimited text data files
 together into one big file.
 
 I recently upgraded to R 2.2.0.  I now get multiple error messages of
 the form:
 The following object(s) are masked from diversitym ( position 4 ) :
 
  X X.1 X.2


These are *Warning* messges, not errors.

You are using attach but never detach in your loop. Each attach masks 
the objects you have attached formerly, because there are the same names 
in it, obviously.

Your code works as before, but you should not use attach without 
detaching. I'd suggest not to use attach() at all unless you know what 
you are doing and it really improved convenience in interactive analyses.

Uwe Ligges



 I searched on masked and read the manual about conflicts but I don't
 really understand what the issue is.  I didn't get this error message,
 using the same code with R 2.1.0.  Can somebody help (I'm not a
 programmer).
 
   [[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

__
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


[R] Error message: The following object(s) are masked

2005-11-03 Thread Ettinger, Nicholas
Hello!

First time posting here:

Here is my code:

x - c(1:22)
finaloutput=cidrm=NULL
finaldiversityoutput=diversitym=NULL

diversityinfo=read.table(Diversity_info.txt, header=T, sep=\t,
row.names=NULL)
attach(diversityinfo)
diversitynr=nrow(diversityinfo)
diversitytemp - matrix(0,nrow=diversitynr,ncol=1)

for(j in 1:length(x))
{
diversitym=read.table(paste(paste(Div-Chr,x[j],
sep=),_corr.txt,sep=), header=T, sep=\t, row.names=NULL)
attach(diversitym)
diversitytemp - cbind(diversitytemp,diversitym)
print(paste(paste(Diversity-Chrom,x[j], sep=),.txt,sep=))
print(dim(diversitytemp))
}

I am essentially trying to combine several tab-delimited text data files
together into one big file.

I recently upgraded to R 2.2.0.  I now get multiple error messages of
the form:
The following object(s) are masked from diversitym ( position 4 ) :

 X X.1 X.2

I searched on masked and read the manual about conflicts but I don't
really understand what the issue is.  I didn't get this error message,
using the same code with R 2.1.0.  Can somebody help (I'm not a
programmer).

[[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


[R] Error Message - Error: symbol print-name too long

2005-09-26 Thread Carl Anderson
Dear All,

I write to ask for information regarding the error message:

Error: symbol print-name too long.

I am afraid that I can't include any code to help with any further diagnosis 
of the problem as the code is far too long to be of any use, and I have not 
been able to re-create the problem in shorter example codes.

I have searched the R manual and help pages and found no mention of this 
error message.

All help appreciated,

Carl A Anderson.

__
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


Re: [R] Error Message - Error: symbol print-name too long

2005-09-26 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



You aren't giving us much to go on, so I can only
make a very wild guess.  Check that your file
doesn't have a stray ` character in it.
R will start reading from that point on and try
to make this an internal symbol.  If it doesn't
find the closing ` for too many characters,
it gives the error message you see.

I have seen this once before and that is what the cause
was - a stray ` put in by hitting the ` key rather than Esc.



Carl Anderson wrote:
 Dear All,
 
 I write to ask for information regarding the error message:
 
 Error: symbol print-name too long.
 
 I am afraid that I can't include any code to help with any further diagnosis 
 of the problem as the code is far too long to be of any use, and I have not 
 been able to re-create the problem in shorter example codes.
 
 I have searched the R manual and help pages and found no mention of this 
 error message.
 
 All help appreciated,
 
 Carl A Anderson.
 
 __
 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

- --
Duncan Temple Lang[EMAIL PROTECTED]
Department of Statistics  work:  (530) 752-4782
371 Kerr Hall fax:   (530) 752-7099
One Shields Ave.
University of California at Davis
Davis, CA 95616, USA
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDOAYs9p/Jzwa2QP4RAhtAAJ97sqWdUTOPjtZ2RMJR0qcfyjIAZgCfZLF1
IXTk0bY5RQUD2e+8VlzLpw4=
=+pim
-END PGP SIGNATURE-

__
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


Re: [R] Error Message - Error: symbol print-name too long

2005-09-26 Thread Carl Anderson
Duncan,

Thank you for your help. I am pleased to say your 'very wild guess' was 
exactly correct. Can't believe I missed it!

Carl
- Original Message - 
From: Duncan Temple Lang [EMAIL PROTECTED]
To: Carl Anderson [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch; [EMAIL PROTECTED]
Sent: Tuesday, September 27, 2005 12:31 AM
Subject: Re: [R] Error Message - Error: symbol print-name too long


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1



 You aren't giving us much to go on, so I can only
 make a very wild guess.  Check that your file
 doesn't have a stray ` character in it.
 R will start reading from that point on and try
 to make this an internal symbol.  If it doesn't
 find the closing ` for too many characters,
 it gives the error message you see.

 I have seen this once before and that is what the cause
 was - a stray ` put in by hitting the ` key rather than Esc.



 Carl Anderson wrote:
 Dear All,

 I write to ask for information regarding the error message:

 Error: symbol print-name too long.

 I am afraid that I can't include any code to help with any further 
 diagnosis
 of the problem as the code is far too long to be of any use, and I have 
 not
 been able to re-create the problem in shorter example codes.

 I have searched the R manual and help pages and found no mention of this
 error message.

 All help appreciated,

 Carl A Anderson.

 __
 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

 - --
 Duncan Temple Lang[EMAIL PROTECTED]
 Department of Statistics  work:  (530) 752-4782
 371 Kerr Hall fax:   (530) 752-7099
 One Shields Ave.
 University of California at Davis
 Davis, CA 95616, USA
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.2 (Darwin)
 Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

 iD8DBQFDOAYs9p/Jzwa2QP4RAhtAAJ97sqWdUTOPjtZ2RMJR0qcfyjIAZgCfZLF1
 IXTk0bY5RQUD2e+8VlzLpw4=
 =+pim
 -END PGP SIGNATURE-


__
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


Re: [R] error message running R2WinBUGS

2005-07-28 Thread Uwe Ligges
This is a question related to WinBUGS, not to R nor to the R2WinBUGS 
interface. Please ask on the appropriate lists/forums related to 
WinBUGS (with plain WinBUGS code, rather than R's interface code).


BTW: Let's answer your question before:

You have specified x[1,28] to be 127, but it is from a Binomial 
distribution with n=100 (hence impossible!).
And that's what the WinBUGS (NOT R!) error message tells you.

Uwe Ligges


qi zhang wrote:

 *Dear R-user,
 *
 I try to run Winbugs from R using bugs function in R2WinBUGS.My model works 
 well in Winbugs except that I can't get DIC. Since I don't need DIC, when I 
 try to run Winbugs from R , I set DIC=FALSE. My model is as following:
  model {
 for (i in 1:N) {
 for(j in 1 : T ) {
 x[i, j] ~ dbin(p[i, j],n[i])
 #Hier.prior 
 p[i, j] ~ dbeta(alpha[i, j], beta[i, j])
 alpha[i, j]  - pi[ j]*(1-theta[i])/theta[i]
 beta[i, j]  -(1-pi[ j])*(1-theta[i])/theta[i]
 }
 } 
 
 for(j in 1 : T ) {
 pi[ j ] ~dbeta(0.1,0.1)I(0.1,0.9)
 }
  
 for (i in 1:N) {
 theta[i] ~dbeta(2,10)
 }
 }
 
  And my R code is as followings:
 
 initials1-list(theta=c(0.2,0.01), pi=rbeta(50, 0.1, 0.1)*0.8+0.1
 
 , p=matrix(rbeta(100, 2, 10)*0.8+0.1,nr=2,nc=50,byrow=TRUE))
 
 inits-list(initials1 initials1)
 
 data-list(N=2,T=50 ,n=c(100,150),x = structure(.Data = c(
 
 3, 47, 8, 19, 87, 69,
 
 2, 4, 75, 24, 16, 81,
 
 10, 78, 87, 44, 17, 56,
 
 23, 75, 55, 85, 84, 69,
 
 6, 36, 8, 90, 47, 6,
 
 87, 61, 49, 57, 28, 56,
 
 31, 54, 75, 79, 67, 38,
 
 28, 13, 89, 63, 32, 68,
 
 70, 7,
 
 24, 95, 8, 14, 127, 134,
 
 7, 8, 133, 40, 76, 126,
 
 0, 132, 120, 137, 9, 91,
 
 3, 130, 18, 80, 134, 95,
 
 12, 34, 19, 111, 34, 25,
 
 127, 79, 132, 84, 72, 134,
 
 67, 44, 95, 69, 80, 51,
 
 57, 12, 138, 137, 64, 80,
 
 130, 58), .Dim = c(2, 50)))
 
  #run winbugs
 
 library(R2WinBUGS)
 
 structure-bugs(data,inits,model.file=S:/Common/zhangqi/ebayes/for 
 R/model.txt,
 
 parameters=c(p,pi,theta),n.chains=2,n.iter=2000,n.burnin=500,
 
 debug=TRUE,DIC=FALSE,bugs.directory=c:/Program Files/WinBUGS14/,
 
 working.directory = NULL )
 
   Even if I changed initial values several times, I still keep geting the 
 following error message in Winbugs: 
  
 display(log)
 
 check(S:/Common/zhangqi/ebayes/for R/model.txt)
 
 model is syntactically correct
 
 data(C:/Program Files/R/rw2011/data.txt)
 
 data loaded
 
 compile(2)
 
 model compiled
 
 inits(1,C:/Program Files/R/rw2011/inits1.txt)
 
 value of binomial x[1,28] must be between zero and order of x[1,28]
 
  I really have no clue about what I can do to fix it. 
 
 Could any of your please take a look at my problem, I truely appreciate any 
 suggestions.
 
  Qi Zhang
 
   [[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

__
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


[R] error message running R2WinBUGS

2005-07-27 Thread qi zhang
*Dear R-user,
*
I try to run Winbugs from R using bugs function in R2WinBUGS.My model works 
well in Winbugs except that I can't get DIC. Since I don't need DIC, when I 
try to run Winbugs from R , I set DIC=FALSE. My model is as following:
 model {
for (i in 1:N) {
for(j in 1 : T ) {
x[i, j] ~ dbin(p[i, j],n[i])
#Hier.prior 
p[i, j] ~ dbeta(alpha[i, j], beta[i, j])
alpha[i, j]  - pi[ j]*(1-theta[i])/theta[i]
beta[i, j]  -(1-pi[ j])*(1-theta[i])/theta[i]
}
} 

for(j in 1 : T ) {
pi[ j ] ~dbeta(0.1,0.1)I(0.1,0.9)
}
 
for (i in 1:N) {
theta[i] ~dbeta(2,10)
}
}

 And my R code is as followings:

initials1-list(theta=c(0.2,0.01), pi=rbeta(50, 0.1, 0.1)*0.8+0.1

, p=matrix(rbeta(100, 2, 10)*0.8+0.1,nr=2,nc=50,byrow=TRUE))

inits-list(initials1 initials1)

data-list(N=2,T=50 ,n=c(100,150),x = structure(.Data = c(

3, 47, 8, 19, 87, 69,

2, 4, 75, 24, 16, 81,

10, 78, 87, 44, 17, 56,

23, 75, 55, 85, 84, 69,

6, 36, 8, 90, 47, 6,

87, 61, 49, 57, 28, 56,

31, 54, 75, 79, 67, 38,

28, 13, 89, 63, 32, 68,

70, 7,

24, 95, 8, 14, 127, 134,

7, 8, 133, 40, 76, 126,

0, 132, 120, 137, 9, 91,

3, 130, 18, 80, 134, 95,

12, 34, 19, 111, 34, 25,

127, 79, 132, 84, 72, 134,

67, 44, 95, 69, 80, 51,

57, 12, 138, 137, 64, 80,

130, 58), .Dim = c(2, 50)))

 #run winbugs

library(R2WinBUGS)

structure-bugs(data,inits,model.file=S:/Common/zhangqi/ebayes/for 
R/model.txt,

parameters=c(p,pi,theta),n.chains=2,n.iter=2000,n.burnin=500,

debug=TRUE,DIC=FALSE,bugs.directory=c:/Program Files/WinBUGS14/,

working.directory = NULL )

  Even if I changed initial values several times, I still keep geting the 
following error message in Winbugs: 
 
display(log)

check(S:/Common/zhangqi/ebayes/for R/model.txt)

model is syntactically correct

data(C:/Program Files/R/rw2011/data.txt)

data loaded

compile(2)

model compiled

inits(1,C:/Program Files/R/rw2011/inits1.txt)

value of binomial x[1,28] must be between zero and order of x[1,28]

 I really have no clue about what I can do to fix it. 

Could any of your please take a look at my problem, I truely appreciate any 
suggestions.

 Qi Zhang

[[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


Re: [R] Error message NA/NaN/Inf in foreign function call (arg 6) when using knn()

2005-07-08 Thread Uwe Ligges
Kerri-Ann Norton wrote:

 I am trying to use knn to do a nearest neighbor classification.  I tried 
 using my dataset and got an error message so I used a simple example to try 
 and understand what I was doing wrong and got the same message.  Here is what 
 I typed into R:
  try
   [,1] [,2] [,3] [,4]
 r A  A  T  G 
 r A  A  T  G 
 f A  A  c  G 
 f A  A  c  G 
 f A  A  c  G 
 
cl2 -factor(c(rep(1,2), rep(2,3)))
cl2
 
 [1] 1 1 2 2 2
 Levels: 1 2
 
knn(try, try, cl2, k = 2)
 
 Error in knn(try, try, cl2, k = 2) : NA/NaN/Inf in foreign function call (arg 
 6)
 In addition: Warning messages: 
 1: NAs introduced by coercion 
 2: NAs introduced by coercion 
 
 I used try as test and train because I thought the error might be that the 
 size of test and train data were different.  If someone could explain what 
 the error means or how to fix it, I would greatly appreciate it.
 Kerri-Ann Norton
 
 __
 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


What is the euclidean distance between c and T?

I think this is a user error which the code does not intercept with a 
nice error message.

Uwe Ligges

__
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


[R] Error message NA/NaN/Inf in foreign function call (arg 6) when using knn()

2005-07-06 Thread Kerri-Ann Norton
I am trying to use knn to do a nearest neighbor classification.  I tried using 
my dataset and got an error message so I used a simple example to try and 
understand what I was doing wrong and got the same message.  Here is what I 
typed into R:
 try
  [,1] [,2] [,3] [,4]
r A  A  T  G 
r A  A  T  G 
f A  A  c  G 
f A  A  c  G 
f A  A  c  G 
 cl2 -factor(c(rep(1,2), rep(2,3)))
 cl2
[1] 1 1 2 2 2
Levels: 1 2
 knn(try, try, cl2, k = 2)
Error in knn(try, try, cl2, k = 2) : NA/NaN/Inf in foreign function call (arg 6)
In addition: Warning messages: 
1: NAs introduced by coercion 
2: NAs introduced by coercion 

I used try as test and train because I thought the error might be that the size 
of test and train data were different.  If someone could explain what the error 
means or how to fix it, I would greatly appreciate it.
Kerri-Ann Norton

__
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


[R] Error message from pamr

2005-06-17 Thread luk
Hi, 
 
I got the fowllowing error message when I run pamr. Could you please advise me 
what does this error mean?
 
Many thanks
--

 mydata - pamr.from.excel(datgrp4, 352, sample.labels=TRUE)

Read 812768 items

Read in 2307 genes

Read in 350 samples

Read in 350 sample labels

Make sure these figures are correct!!

 mytrain - pamr.train(mydata)

Error in if (from == to || length.out  2) by - 1 :

missing value where logical needed





-

 Rekindle the Rivalries. Sign up for Fantasy Football
[[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


Re: [R] Error message from pamr

2005-06-17 Thread Uwe Ligges
luk wrote:

 Hi, 
  
 I got the fowllowing error message when I run pamr. Could you please advise 
 me what does this error mean?
  
 Many thanks
 --
 
 
mydata - pamr.from.excel(datgrp4, 352, sample.labels=TRUE)
 
 
 Read 812768 items
 
 Read in 2307 genes
 
 Read in 350 samples
 
 Read in 350 sample labels
 
 Make sure these figures are correct!!
 
 
mytrain - pamr.train(mydata)
 
 
 Error in if (from == to || length.out  2) by - 1 :
 
 missing value where logical needed


There is no reproducible example given, hence we can only guess.
Might be a bug in package pamr or user error, if the first, you want 
to contact the package maintainer rather than R help.

Uwe Ligges




 
 
 
   
 -
 
  Rekindle the Rivalries. Sign up for Fantasy Football
   [[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

__
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


[R] Error message glmmPQL

2005-05-17 Thread Pedro Torres Saavedra
Hi,

I'm fitting a model for two-nested binay data in glmmPQL function but I have 
this error message: Error in solve.default(estimates[dimE[1] - (p:1), dimE
[2] - (p:1), drop = FALSE]) : system is computationally singular: reciprocal 
condition number = 1.14416e-018.

How do I can solve this problem? Or the problem are the data?

Thanks,


Pedro A. Torres S.
Graduate Student - Statistics
Department of Mathematics
University of Puerto Rico at Mayaguez
(1 787) 832-4040 X 2537

__
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


[R] Error message from vignette strucchange-intro example

2004-11-05 Thread Thomas Schnhoff
Hello,
I am just studying the following example from vignette: 
strucchange-intro,

contineousely ending up in an error.
This is the given code:
1. library(strucchange)
2. data(USIncExp)
3. if (!package:stats %in% search()) library(ts)
4. USIncExp2 - window(USIncExp, start = c(1985, 12))
A.Modelling:
coint.res - residuals(lm(expenditure ~ income, data = USIncExp2))
coint.res - lag(ts(coint.res, start = c(1985, 12), freq = 12),k = -1)
USIncExp2 - cbind(USIncExp2, diff(USIncExp2), coint.res)
USIncExp2 - window(USIncExp2, start = c(1986, 1), end = c(2001,2))
#here is what eval is looking for in vain: diff.expenditure
colnames(USIncExp2) - 
c(income,expenditure,diff.income,diff.expenditure,coint.res)

B. Error correction formula
ecm.model - diff.expenditure ~ coint.res + diff.income
C. Using EFP (OLS) test function
ocus - efp(ecm.model, type = OLS-CUSUM, data = USIncExp2)
or
me - efp(ecm.model, type = ME, data = USIncExp2, h = 0.2)
Both commads under C give me :
---
Error in eval(expr, envir, enclos) : Object diff.expenditure not found
---
Since quite some time I am sitting here and wonder whether there is an 
error in the given code or if it my simple inability to catch up with 
a self-breed error (???)

--
platform i386-pc-linux-gnu
arch i386
os   linux-gnu
system   i386, linux-gnu
status
major2
minor0.0
year 2004
month10
day  04
language R


Maybe someone to direct my delusion to something helpful, so far I've 
looked for typos and alike, as far I can say the code should work, 
isn't it?

Thomas
__
[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] Error message from vignette strucchange-intro example

2004-11-05 Thread Achim Zeileis
Thomas:

 I am just studying the following example from vignette: 
 strucchange-intro,

With problems like this, please contact the package maintainer, or at
least Cc.

 contineousely ending up in an error.
 
 This is the given code:
 
 1. library(strucchange)
 2. data(USIncExp)
 3. if (!package:stats %in% search()) library(ts)
 4. USIncExp2 - window(USIncExp, start = c(1985, 12))
 
 A.Modelling:
 
 coint.res - residuals(lm(expenditure ~ income, data = USIncExp2))
 coint.res - lag(ts(coint.res, start = c(1985, 12), freq = 12),k = -1)
 USIncExp2 - cbind(USIncExp2, diff(USIncExp2), coint.res)
 USIncExp2 - window(USIncExp2, start = c(1986, 1), end = c(2001,2))
 
 #here is what eval is looking for in vain: diff.expenditure
 colnames(USIncExp2) - 
 c(income,expenditure,diff.income,diff.expenditure,coint.res)

But until here the code is working, right?
You've got a multivariate time series object now with the above column
names, haven't you? 

 B. Error correction formula
 
 ecm.model - diff.expenditure ~ coint.res + diff.income
 
 C. Using EFP (OLS) test function
 
 ocus - efp(ecm.model, type = OLS-CUSUM, data = USIncExp2)
 
 
 Both commads under C give me :
 
 ---
 Error in eval(expr, envir, enclos) : Object diff.expenditure not
 found
 ---
 
 Since quite some time I am sitting here and wonder whether there is an
 error in the given code or if it my simple inability to catch up with 
 a self-breed error (???)

Looks like the latter. I tried this with the CRAN versions of
strucchange, sandwich and zoo with R --vanilla (in 2.0.0) and had no
problems. Also the daily CRAN checks don't indicate that something went
wrong:
  http://cran.r-project.org/src/contrib/checkSummary.html

I suggest that you have another thorough look. If you find something
str(ucch)ange, you can also contact me off-list.
Z

 
 --
 platform i386-pc-linux-gnu
 arch i386
 os   linux-gnu
 system   i386, linux-gnu
 status
 major2
 minor0.0
 year 2004
 month10
 day  04
 language R
 
 
 
 
 Maybe someone to direct my delusion to something helpful, so far I've 
 looked for typos and alike, as far I can say the code should work, 
 isn't it?
 
 Thomas
 
 __
 [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] Error Message: MCMCpack and coda

2004-11-01 Thread Andrew D. Martin
Robin,
This is a problem with coda's mcmc summary method.  I suspect it is in 
the spectrum0() call therein, but I don't know for sure.

For your immediate purposes you could extract the posterior density 
sample as a matrix from the mcmc object and manually compute quantities 
of interest.

Best,
ADM
On Oct 31, 2004, at 3:15 PM, [EMAIL PROTECTED] wrote:
Hello All,
I'm trying to run a one-dimenional irt model using the packages MCMC 
and
coda on a rather large set of roll-call voting data with many missing
observations.  Here's a sample of the code:
Post10-
MCMCirt1d (Italy10, burnin = 1000, mcmc=5, thin=100, verbose=TRUE,
theta.constraints = list(V549=1, V443=-1))

The MCMCirt1d command seems to work fine, but when I try to summarize 
the
output I get the following error message(s):

summary(Post10)
Error: NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning message:
Step size truncated due to divergence
My understanding is that this has something to do with the missing 
data,
though I don't know how to address this issue.  Any help would be 
greatly
appreciated.

Thank you,
Robin Best
__
[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

--
Andrew D. Martin, Ph.D.
Department of Political Science
Washington University
Campus Box 1063
One Brookings Drive
St. Louis, MO 63130
(314) 935-5863 (Office)
(314) 753-8377 (Cell)
(314) 935-5856 (Fax)
Office: Eliot Hall 326
Email: [EMAIL PROTECTED]
WWW:   http://adm.wustl.edu
__
[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] Error Message: MCMCpack and coda

2004-10-31 Thread rbest1
Hello All,

I'm trying to run a one-dimenional irt model using the packages MCMC and
coda on a rather large set of roll-call voting data with many missing
observations.  Here's a sample of the code:
Post10-
MCMCirt1d (Italy10, burnin = 1000, mcmc=5, thin=100, verbose=TRUE,
theta.constraints = list(V549=1, V443=-1))

The MCMCirt1d command seems to work fine, but when I try to summarize the
output I get the following error message(s):

summary(Post10)
Error: NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning message:
Step size truncated due to divergence

My understanding is that this has something to do with the missing data,
though I don't know how to address this issue.  Any help would be greatly
appreciated.

Thank you,
Robin Best

__
[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] Error Message: MCMCpack and coda

2004-10-31 Thread Prof Brian Ripley
On Sun, 31 Oct 2004 [EMAIL PROTECTED] wrote:

 Hello All,
 
 I'm trying to run a one-dimenional irt model using the packages MCMC and
 coda on a rather large set of roll-call voting data with many missing
 observations.  Here's a sample of the code:
 Post10-
 MCMCirt1d (Italy10, burnin = 1000, mcmc=5, thin=100, verbose=TRUE,
 theta.constraints = list(V549=1, V443=-1))
 
 The MCMCirt1d command seems to work fine, but when I try to summarize the
 output I get the following error message(s):
 
 summary(Post10)
 Error: NA/NaN/Inf in foreign function call (arg 1)
 In addition: Warning message:
 Step size truncated due to divergence
 
 My understanding is that this has something to do with the missing data,
 though I don't know how to address this issue.  Any help would be greatly
 appreciated.

Your understanding is not correct:  NaN and Inf result from numeric 
overflow, divide by zero and similar.

When you get an error message, try traceback() to see where it came from.
This came from a `foreign', that is .C or .Fortran, call, passing in a NaN 
or Inf or NA, and probably one of the first two given the warning on 
divergence.  But without a tracebacl() we don't know which call.

-- 
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] Error message in mclust

2004-10-19 Thread Brian Newquist
I keep on receiving the message below after submitting the following line
using the mclust package.  m2 is a 99 X 1 column vector. 

 

*   em(modelName = E, m2, mu = c(25, 50), sigmasq=10, pro = c(0.4,
0.6))

 

Error in as.double.default(data) : (list) object cannot be coerced to
double.

 

Why do I receive this error?

 

Thank,

 

 

Brian C. Newquist

Research Statistician

Constella Health Sciences

2605 Meridian Parkway, Suite 200

Durham, NC 27713

Tel:  (919) 313-7588

Fax: (919) 544-7507

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

www.constellagroup.com http://www.constellagroup.com 

 

 

 

 


[[alternative HTML version deleted]]

__
[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] Error message in mclust

2004-10-19 Thread Sundar Dorai-Raj

Brian Newquist wrote:
I keep on receiving the message below after submitting the following line
using the mclust package.  m2 is a 99 X 1 column vector. 

 

*   em(modelName = E, m2, mu = c(25, 50), sigmasq=10, pro = c(0.4,
0.6))
 

Error in as.double.default(data) : (list) object cannot be coerced to
double.
 

Why do I receive this error?
Brian,
Are you sure m2 is a vector and not a data.frame or list? I can 
replicate your error message as follows:

library(mclust)
# from ?em
data(iris)
irisMatrix - as.matrix(iris[, 1:4])
irisClass - iris[, 5]
msEst - mstep(modelName = EEE, data = irisMatrix,
   z = unmap(irisClass))
iris.em1 - em(modelName = msEst$modelName, data = irisMatrix,
   mu = msEst$mu, Sigma = msEst$Sigma, pro = msEst$pro)
# not from ?em
iris.em2 - em(modelName = msEst$modelName, data = iris[, 1:4],
   mu = msEst$mu, Sigma = msEst$Sigma, pro = msEst$pro)
The second call to em produces:
Error in as.double.default(data) : (list) object cannot be coerced to double
That said, it shouldn't matter that `data' is a data.frame since the 
help page says explicitly that data.frames are allowed as long as the 
variables are not categorical. The first for columns of iris are `numeric'.

R-2.0.0Patched with MCLUST 2.1-6
--sundar
__
[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] Error message in function mars() in package mda

2004-08-11 Thread Martin Maechler
 Jude == Jude Ryan [EMAIL PROTECTED]
 on Tue, 10 Aug 2004 15:56:38 -0400 writes:

Jude Hi, I am using function mars() in package mda to find
Jude knots in a whole bunch of predictor variables. I hope
Jude to be able to replicate all or some of the basis
Jude functions that the MARS software from Salford Systems
Jude creates.  When I ran mars() on a small dataset, I was
Jude able to get the knots.  However, when I tried running
Jude mars() on a larger dataset (145 predictor variables),
Jude for a different project, I get the following error
Jude message:

 fit1 - mars(disney2[,-146], disney2[,146])
Jude Error in mars(disney2[, -146], disney2[, 146]) :
Jude NA/NaN/Inf in foreign function call (arg 5)
Jude In addition: Warning messages:
Jude 1: NAs introduced by coercion
Jude 2: NAs introduced by coercion
 

Jude Does arg 5 refer to the 5th column in my dataset? 
no.

Jude This seems to be a data problem, is this correct?

we cannot know with the little information you give.
Please read (and follow!!) the posting guide!
- reproducible example !
- contact the maintainer of the package in question!

The following reproducible example doesn't show the problem you
mentioned:

 library(mda)
 set.seed(101)
 X - matrix(rnorm(200 * 150), 200, 150)
 fX - mars(X[,-146], X[,146])
 str(fX)
List of 15
 $ call  : language mars(x = X[, -146], y = X[, 146])
 $ all.terms : int [1:93] 1 2 3 4 5 6 7 8 9 10 ...
 $ selected.terms: int [1:25] 1 2 3 4 5 10 12 13 14 16 ...
 $ penalty   : num 2
 $ degree: num 1
 $ nk: num 299
 $ thresh: num 0.001
 $ gcv   : num 0.72
 $ factor: num [1:99, 1:149] 0 0 0 0 0 0 0 0 0 0 ...
  ..- attr(*, dimnames)=List of 2
  .. ..$ : NULL
  .. ..$ : NULL
 $ cuts  : num [1:99, 1:149] 0 0 0 0 0 0 0 0 0 0 ...
 $ residuals : num [1:200, 1]  0.789  0.111 -0.212  1.017 -0.391 ...
 $ fitted.values : num [1:200, 1] -0.216 -0.249 -0.116 -0.274 -0.353 ...
 $ lenb  : int 99
 $ coefficients  : num [1:25, 1]  0.696  0.491  1.013 -1.043 -0.409 ...
 $ x : num [1:200, 1:25] 1 1 1 1 1 1 1 1 1 1 ...
 - attr(*, class)= chr mars
 

BTW (as a note to the maintainer of mda):

  print.mars()  {and maybe summary.mars()} is severly lacking...

Jude Are there any other functions in R that will give me
Jude the knots for a set of predictor variables?

maybe, quite probably. This question is too vague [the knots?]


Regards,
Martin Maechler

__
[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] Error message in function mars() in package mda

2004-08-10 Thread Jude Ryan
Hi,
I am using function mars() in package mda to find knots in a whole bunch 
of predictor variables. I hope to be able to replicate all or some of 
the basis functions that the MARS software from Salford Systems creates. 
When I ran mars() on a small dataset, I was able to get the knots. 
However, when I tried running mars() on a larger dataset (145 predictor 
variables), for a different project, I get the following error message:

 fit1 - mars(disney2[,-146], disney2[,146])
Error in mars(disney2[, -146], disney2[, 146]) :
   NA/NaN/Inf in foreign function call (arg 5)
In addition: Warning messages:
1: NAs introduced by coercion
2: NAs introduced by coercion

Does arg 5 refer to the 5th column in my dataset? This seems to be a 
data problem, is this correct?

Are there any other functions in R that will give me the knots for a set 
of predictor variables?

Any help is greatly appreciated.
Thanks,
Jude
__
[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] Error message handling

2004-06-24 Thread Prof Brian Ripley
On Wed, 23 Jun 2004 [EMAIL PROTECTED] wrote:

 Dear, R experts.
 Does anybody have experience with 'optim' function?

Yes.

 I have an error message as the following.
 
 Error in optim(transcoefs, fn = hfdeviance, gr = hfdeviance.grad, method
 = BFGS,  :
 initial value in vmmin is not finite
 
 I want to make a comment when this happen.

 Function 'fn' can return 'NA' or 'Inf' if the function cannot be
 evaluated at the supplied value, but the initial value must have a
 computable finite value of 'fn'. (Except for method 'L-BFGS-B'
 where the values should always be finite.)

It's your error so you can control it (by not making the error).

 Is there way I can put *my* message after this error occur?

You can use try/tryCatch and similar constructs.  But it would be better
to use a valid starting value as optim asks, and you can so that by
calling hfdeviance(transcoefs) and checking it is finite.

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Error message handling

2004-06-23 Thread Kang . Changku




Dear, R experts.
Does anybody have experience with 'optim' function?

I have an error message as the following.

Error in optim(transcoefs, fn = hfdeviance, gr = hfdeviance.grad, method
= BFGS,  :
initial value in vmmin is not finite

I want to make a comment when this happen.
Is there way I can put *my* message after this error occur?

Thanks in advance

+
Changku Kang
National Center for Environmental Assessment
EPA  (B211F)
919-541-1396
919-541-0245 (fax)
[EMAIL PROTECTED]

Graduate Student
Department of Statistics, NCSU
[EMAIL PROTECTED]
919-513-2956
+

__
[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


[R] error message

2004-06-07 Thread Tim York
I received the below error using UNIX R.  Could someone instruct me on 
helpful batch options to avoid this please? 

ERROR: cannot allocate vector of size 32kb
__
[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


RE: [R] error message

2004-06-07 Thread Liaw, Andy
The message says at some point in the calculation, R tries to get about
312MB of memory and was not able to.  Maybe try increasing the amount of
virtual (or physical) memory in your system?

Andy

 From: Tim York
 
 I received the below error using UNIX R.  Could someone 
 instruct me on 
 helpful batch options to avoid this please? 
 
 ERROR: cannot allocate vector of size 32kb
 
 __
 [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
 


__
[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


[R] error message in help.search

2004-04-22 Thread Tomo Eguchi
Hello, 

I looked around but couldn't find solutions for my problem.  I downloaded
v.1.9 and the patched version for windows.  I use Windows XP professional
with AMD Athlon XP.  When I use help.search() function, I get the following
error message:

Error in .readRDS(contentsFile) : can't read workspace version 167772160
written by R 512.1.7; need R 256.1.4 or newer

What does this mean?  More importantly, how can I fix it?  

Thanks,

Tomo

*
Tomoharu Eguchi
Protected Resources Division
Southwest Fisheries Science Center
8604 La Jolla Shores Dr.
La Jolla, CA 92037
858.546.5615 Voice
858.546.5657 FAX

__
[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


[R] Error message during debug

2004-04-20 Thread Gabor Grothendieck


In R 1.9.0 on Windows XP Pro I get an error if I try to
debug the identity function f shown:

  f - function(x)x
  debug(f)
  f(1)
 debugging in: f(1)
 Error in f(1) : Unimplemented feature in eval
  R.version.string
 [1] R version 1.9.0, 2004-04-12

Without debuggging its ok.



___

Make My Way your home on the Web - http://www.myway.com

__
[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


Re: [R] Error message during debug

2004-04-20 Thread Sundar Dorai-Raj


Gabor Grothendieck wrote:
In R 1.9.0 on Windows XP Pro I get an error if I try to
debug the identity function f shown:
  f - function(x)x
  debug(f)
  f(1)
 debugging in: f(1)
 Error in f(1) : Unimplemented feature in eval
  R.version.string
 [1] R version 1.9.0, 2004-04-12
Without debuggging its ok.



Try

f - function(x) { x }

--sundar

__
[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


Re: [R] Error message during debug

2004-04-20 Thread Gabor Grothendieck
Sundar Dorai-Raj sundar.dorai-raj at PDF.COM writes:

: 
: Gabor Grothendieck wrote:
:  
:  In R 1.9.0 on Windows XP Pro I get an error if I try to
:  debug the identity function f shown:
:  
:f - function(x)x
:debug(f)
:f(1)
:   debugging in: f(1)
:   Error in f(1) : Unimplemented feature in eval
:R.version.string
:   [1] R version 1.9.0, 2004-04-12
:  
:  Without debuggging its ok.
:  
:  
:  
: 
: Try
: 
: f - function(x) { x }
: 
: --sundar

That made the error go away.  Note that 

  f - function(x)sin(x)

does NOT produce the error under debugging.  Don't know why 
x and sin(x) would act differently in the above respect.

__
[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


[R] error message in mle function

2004-04-19 Thread Bill Shipley
I am getting an error message concerning the estimation of confidence
intervals when fitting a mixed model and don't know what the problem is,
or its solution.

 

Just to provide context: the model is describing the effects of age,
exp(age), harvest age, and climate variables on bighorn horn annular
length.

 

The data structure is repeated measures (between individuals, within
individuals over time).

 

Id is a random effect (there are between 3-11 horn measurements per ram,
one horn measurement per age, over the 25 year period in the dataset).

 

The mixed effect results is unable to provide confidence intervals for
the fixed and random effects because: of an error in the
variance-covariance structure. The error says that the intervals are
non-positive definitive. 

 

 

Bill Shipley

 


[[alternative HTML version deleted]]

__
[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


Re: [R] error message in mle function

2004-04-19 Thread Spencer Graves
 Is one of your variance components essentially estimating zero?  
If you check the numbers, delete the smallest one, and then do anova 
comparing the two fits, you might find that the one you deleted was not 
statistically significant. 

 If I'm not mistaken, lme estimates the logarithms of the 
variance components.  When one of them is zero, the logarithm wants to 
go to (-Inf).  In that case, lme will still return an answer.  
However, intervals complains, because the observed information matrix 
for the parameter estimates is singular in the direction of log(variance 
component) that wants to go to (-Inf).  Doug Bates, the developer of 
lme has taught many people about how to fix that problem using profile 
likelihood.  I have not seen lme4 yet, so the problem may already have 
been fixed.  If any if this is inaccurate, I hope Doug will correct me. 

 hope this helps. 
 Spencer Graves

Bill Shipley wrote:

I am getting an error message concerning the estimation of confidence
intervals when fitting a mixed model and don't know what the problem is,
or its solution.


Just to provide context: the model is describing the effects of age,
exp(age), harvest age, and climate variables on bighorn horn annular
length.


The data structure is repeated measures (between individuals, within
individuals over time).


Id is a random effect (there are between 3-11 horn measurements per ram,
one horn measurement per age, over the 25 year period in the dataset).


The mixed effect results is unable to provide confidence intervals for
the fixed and random effects because: of an error in the
variance-covariance structure. The error says that the intervals are
non-positive definitive. 





Bill Shipley



	[[alternative HTML version deleted]]

__
[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
 

__
[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


[R] Error message - what does it mean???

2004-03-09 Thread Monica Palaseanu-Lovejoy
Hi,

I am trying to calculate mahalanobis distances for a matrix x with 
n*p variables. I am getting the following error:

md2 - mahalanobis(x, center, cov)
Error in solve.default(cov, tol = tol.inv) : 
system is computationally singular: reciprocal condition 
number = 2.11165e-009

What does it means?

Thank you so much for any help,

Monica

__
[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


Re: [R] Error message - what does it mean???

2004-03-09 Thread Prof Brian Ripley
On Tue, 9 Mar 2004, Monica Palaseanu-Lovejoy wrote:

 Hi,
 
 I am trying to calculate mahalanobis distances for a matrix x with 
 n*p variables. I am getting the following error:
 
 md2 - mahalanobis(x, center, cov)
 Error in solve.default(cov, tol = tol.inv) : 
 system is computationally singular: reciprocal condition 
 number = 2.11165e-009
 
 What does it means?

Error messages usually mean what they say, and it hard to see what you
mind to understand here.  Whatever you supplied for `cov' is a singular
matrix to the default tolerance, described on the help page.  If you know 
what is going on with your data, you could reduce the argument `tol.inv'.

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] error message from regsubsets

2004-02-06 Thread Rajarshi Guha
Hi, I'm using regsubsets and it works fine when nvmax = 4. However when
I go for any value above 4, I get the error:

Warning message:
XHAUST returned error code -999 in: leaps.exhaustive(a, really.big =
really.big)

I'm calling regsubsets as:

lp - regsubsets(x,y,nbest=1,nvmax=5,intercept=T,really.big=T,
method=exhaustive)

x is a data.frame with 40 variables and 277 observations (in the rows)
and y is a vector of length 277. The manual mentions that really.big
should be TRUE when there are more than 50 variables. But even if when I
set it to FALSE in the above command it still fails with the error
mesage.
Thanks

Could anybody explain what this error means?
---
Rajarshi Guha [EMAIL PROTECTED] http://jijo.cjb.net
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
---
Enzymes are things invented by biologists that explain things which
otherwise require harder thinking.
-- Jerome Lettvin

__
[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


Re: [R] error message

2004-01-24 Thread forkusam

 I am trying to calculate n, using power.t.test

power.t.test(n=NULL,delta=delta, sd=sigmaEins,
sig.level= alpha, power=power, type=c(two.sample),
alternative=c(two.sided))

The values of the parameter are read in from a file.
 I have no idea what the error message means.

--- Peter Dalgaard [EMAIL PROTECTED] wrote:
 forkusam [EMAIL PROTECTED] writes:
 
   Hi,
  Can someone please tell me what such an error
 message
  could mean. i.e where a problem must have arised.
  
  Error in uniroot(function(n) eval(p.body) - power,
  c(2, 1e+07)) : 
  f() values at end points not of opposite
 sign
 
 Looks like the innards of one of the power
 calculations, finding n to
 achieve a given power. You'd likely get an error
 like that if the
 power is not between 0 and 1, but how about telling
 us what you were
 trying to do?
 
 -- 
O__   Peter Dalgaard Blegdamsvej
 3  
   c/ /'_ --- Dept. of Biostatistics 2200 Cph. N 
  
  (*) \(*) -- University of Copenhagen   Denmark 
 Ph: (+45) 35327918
 ~~ - ([EMAIL PROTECTED])
 FAX: (+45) 35327907


=
=
Sylvie B. Forkusam
Eppelheimer Str.52/A2-5-2
69115 Heidelberg, Germany
Tel: (0049)-06221/346913
Mobile: 0179-6816276

__
[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


Re: [R] error message

2004-01-24 Thread Uwe Ligges


On Sat, 24 Jan 2004, forkusam wrote:

 
  I am trying to calculate n, using power.t.test
 
 power.t.test(n=NULL,delta=delta, sd=sigmaEins,
 sig.level= alpha, power=power, type=c(two.sample),
 alternative=c(two.sided))
 
 The values of the parameter are read in from a file.
  I have no idea what the error message means.

Peter Dalgaard asked you to specify a *reproducible* example.
So, please specify some values for delta, sigmaEins, alpha, power.

Uwe Ligges

 
 --- Peter Dalgaard [EMAIL PROTECTED] wrote:
  forkusam [EMAIL PROTECTED] writes:
  
Hi,
   Can someone please tell me what such an error
  message
   could mean. i.e where a problem must have arised.
   
   Error in uniroot(function(n) eval(p.body) - power,
   c(2, 1e+07)) : 
   f() values at end points not of opposite
  sign
  
  Looks like the innards of one of the power
  calculations, finding n to
  achieve a given power. You'd likely get an error
  like that if the
  power is not between 0 and 1, but how about telling
  us what you were
  trying to do?
  
  -- 
 O__   Peter Dalgaard Blegdamsvej
  3  
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N 
   
   (*) \(*) -- University of Copenhagen   Denmark 
  Ph: (+45) 35327918
  ~~ - ([EMAIL PROTECTED])
  FAX: (+45) 35327907
 
 
 =
 =
 Sylvie B. Forkusam
 Eppelheimer Str.52/A2-5-2
 69115 Heidelberg, Germany
 Tel: (0049)-06221/346913
 Mobile: 0179-6816276
 
 __
 [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


__
[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


[R] error message

2004-01-21 Thread forkusam
 Hi,
Can someone please tell me what such an error message
could mean. i.e where a problem must have arised.

Error in uniroot(function(n) eval(p.body) - power,
c(2, 1e+07)) : 
f() values at end points not of opposite sign


Thank you
cilver

=
=
Sylvie B. Forkusam
Eppelheimer Str.52/A2-5-2
69115 Heidelberg, Germany
Tel: (0049)-06221/346913
Mobile: 0179-6816276

__
[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


Re: [R] error message

2004-01-21 Thread Peter Dalgaard
forkusam [EMAIL PROTECTED] writes:

  Hi,
 Can someone please tell me what such an error message
 could mean. i.e where a problem must have arised.
 
 Error in uniroot(function(n) eval(p.body) - power,
 c(2, 1e+07)) : 
 f() values at end points not of opposite sign

Looks like the innards of one of the power calculations, finding n to
achieve a given power. You'd likely get an error like that if the
power is not between 0 and 1, but how about telling us what you were
trying to do?

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[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


[R] error message in plot(aov-object) -- repost

2004-01-16 Thread Pascal A. Niklaus
Hi all,

I posted this question several days ago, but did not get any answer 
until now. Since I still have no clue about the source of this error 
message, I repost a description of the problem including some code:

A student at our institute fitted an aov model, and got the following 
error message:

 plot(p.aov)
Hit Return to see next plot:
Hit Return to see next plot:
Error in plot.window(xlim, ylim, log, asp, ...) :
   need finite ylim values
The second plot was not produced. I then tried to produced the plot
manually, which worked, and checked the range of the residuals:
 qqnorm(resid(p.aov))
 range(resid(p.aov))
[1] -0.2428688  0.2020649
Her data set and the model are as follows:

Data:
 http://www.bot.unibas.ch/~pascal/ParzJan.csv
Model (I don't understand the model, but that's not the issue here)
 p - read.csv(ParzJan.csv,header=T)
 p.aov -aov(terms(JI~SP+Ex+Neig+pH+K/G+H+D+tN+br+aN:br+tN:D
   +br:D+aN:br:D+br:tN+aN:br:D + aN:br:tN+ K:D+ K:tN+ K:br
   +K:aN:br+ G:K:D+ G:K:tN+ G:K:br+G:K:aN:br+ D:H+ tN:H+ br:H
   + aN:br:H, keep.order=T), data=p)
Any help regarding the source of this plot() error message is appreciated.

Pascal

P.S.: She used R 1.7.1 on a Mac, but the problem was reproducible on R 
1.8.1 under Linux.

__
[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


Re: [R] error message in plot(aov-object) -- repost

2004-01-16 Thread Uwe Ligges
Pascal A. Niklaus wrote:

Hi all,

I posted this question several days ago, but did not get any answer 
until now. Since I still have no clue about the source of this error 
message, I repost a description of the problem including some code:

A student at our institute fitted an aov model, and got the following 
error message:

 plot(p.aov)
Hit Return to see next plot:
Hit Return to see next plot:
Error in plot.window(xlim, ylim, log, asp, ...) :
   need finite ylim values
The second plot was not produced. I then tried to produced the plot
manually, which worked, and checked the range of the residuals:
 qqnorm(resid(p.aov))
 range(resid(p.aov))
[1] -0.2428688  0.2020649
Her data set and the model are as follows:

Data:
 http://www.bot.unibas.ch/~pascal/ParzJan.csv
Model (I don't understand the model, but that's not the issue here)
 p - read.csv(ParzJan.csv,header=T)
 p.aov -aov(terms(JI~SP+Ex+Neig+pH+K/G+H+D+tN+br+aN:br+tN:D
   +br:D+aN:br:D+br:tN+aN:br:D + aN:br:tN+ K:D+ K:tN+ K:br
   +K:aN:br+ G:K:D+ G:K:tN+ G:K:br+G:K:aN:br+ D:H+ tN:H+ br:H
   + aN:br:H, keep.order=T), data=p)
Any help regarding the source of this plot() error message is appreciated.
Without the data nobody was able to reproduce your problem ..

plot.lm() produces the error message, in particular the lines

   hii - lm.influence(x, do.coef = FALSE)$hat

which appears to be 1 in some cases, and

   rs - r.w/(s * sqrt(1 - hii))

(you get a division by zero and the outcome is Inf, hence it's not 
possible to scale the plot any more).

I'd call it a bug, but I don't know what the bug really is. I'll think 
about it...

Uwe Ligges






Pascal

P.S.: She used R 1.7.1 on a Mac, but the problem was reproducible on R 
1.8.1 under Linux.

__
[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
__
[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


Re: [R] error message in plot(aov-object) -- repost

2004-01-16 Thread Peter Dalgaard
Uwe Ligges [EMAIL PROTECTED] writes:

 plot.lm() produces the error message, in particular the lines
 
 hii - lm.influence(x, do.coef = FALSE)$hat
 
 which appears to be 1 in some cases, and
 
 rs - r.w/(s * sqrt(1 - hii))
 
 (you get a division by zero and the outcome is Inf, hence it's not
 possible to scale the plot any more).
 
 
 I'd call it a bug, but I don't know what the bug really is. I'll think
 about it...

If the $hat is 1, then the residual is theoretically zero and you
should get 0/0 == NA which would be much less trouble. 

Apparently, floating poing arithmetic makes it not quite so and you
get Inf in some cases. I'd expect that rs[hii==1] - NA would fix
things up, although you might possibly need a fuzz factor (hii 
1-1e-10 or so).

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[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


[R] error message in plot(aov-object)

2004-01-14 Thread Pascal A. Niklaus
Hi all,

A student at our institute asked me for help with the following problem:

After fitting an aov model, she wanted diagnostic plots, and got the 
following error message:

 plot(p.aov)
Hit Return to see next plot:
Hit Return to see next plot:
Error in plot.window(xlim, ylim, log, asp, ...) :
   need finite ylim values
In addition: Warning message:
X11 used font size 8 when 9 was requested
The second plot was not produced. I then tried to produced the plot 
manually, which worked, and checked the range of the residuals:

 qqnorm(resid(p.aov))
 range(resid(p.aov))
[1] -0.2428688  0.2020649
She used R 1.7.1 on a Mac, but I reproduced the problem on R 1.8.1 under 
Linux.

Any help regarding the source of this problem is appreciated

Pascal

__
[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


[R] error message in simulation

2003-10-28 Thread Tu Yu-Kang
Dear R-users,

I am a dentist (so forgive me if my question looks stupid) and came across 
a problem when I did simulations to compare a few single level and two 
level regressions.

The simulations were interrupted and an error message came out like 'Error 
in MEestimate(lmeSt, grps) : Singularity in backsolve at level 0, block 1'.

My collegue suggested that this might be due to my codes was not efficient 
and ran out of memory.  If this is the reason, could you please help me 
improve my codes writing.

However, as I slightly changed the parameters, it ran well.  So I suspect 
memory is problem.

I use R 1.8.0 and Windows XP professional.  My computer has a Pentium 4 2.4 
with 512 MB memory.

Thanks in advance.

best regards,

Yu-Kang Tu

Clinical Research Fellow
Leeds Dental Institute
University of Leeds
## change scores simulation
close.screen(all=TRUE)
split.screen(c(3,3))
nitns-1
nsims-100
r-0.1
param1-c(1:nitns)
param2-c(1:nitns)
param3-c(1:nitns)
param4-c(1:nitns)
param5-c(1:nitns)
param6-c(1:nitns)
param7-c(1:nitns)
param8-c(1:nitns)
param9-c(1:nitns)
param10-c(1:nitns)
param11-c(1:nitns)
param12-c(1:nitns)
param13-c(1:nitns)
param14-c(1:nitns)
for(itn in 1:nitns){
g-rbinom(nsims,1,0.5)
b-rnorm(nsims,0,1)*10
rn-rnorm(nsims,0,1)*10
a-b*r+rn*(1-r^2)^0.5
a-round(a)+50
a-a-g*5
b-round(b)+50
abs.2-function(x) ifelse(x1,1,x)
b-abs.2(b)
c-b-a
p-c/b
lm1-lm(a~g)
lm2-lm(c~g)
lm3-lm(p~g)
lm4-lm(a~b+g)
gr-c(g,g)
occasion-rep(0:1,c(nsims,nsims))
occ-occasion-0.5
ppd-c(b,a)
h-rep(0,nsims)
mb-mean(b)
bppd-b-mb
bappd-c(h,bppd)
occgr-occ*gr
subject-c(1:nsims)
sub-c(subject,subject)
library(nlme)
lm5-lme(ppd~occ+gr+occgr,random=~1|sub)
lm5f-fixed.effects(lm5)
lm5c-as.matrix(lm5f)
lm5a-anova(lm5)
lm6-lme(ppd~occ+gr+occgr,random=~1|sub,method=ML)
lm6f-fixed.effects(lm6)
lm6c-as.matrix(lm6f)
lm6a-anova(lm6)
lm7-lme(ppd~occ+gr+occgr+bappd,random=~1|sub,method=ML)
lm7f-fixed.effects(lm7)
lm7c-as.matrix(lm7f)
lm7a-anova(lm7)
param1[itn]-coef(summary(lm1))[2,1]
param2[itn]-coef(summary(lm2))[2,1]
param3[itn]-coef(summary(lm3))[2,1]
param4[itn]-coef(summary(lm4))[3,1]
param5[itn]-lm5c[4,1]
param6[itn]-lm6c[4,1]
param7[itn]-lm7c[4,1]
param8[itn]-coef(summary(lm1))[2,4]
param9[itn]-coef(summary(lm2))[2,4]
param10[itn]-coef(summary(lm3))[2,4]
param11[itn]-coef(summary(lm4))[3,4]
param12[itn]-lm5a[4,4]
param13[itn]-lm6a[4,4]
param14[itn]-lm7a[4,4]
}
#the error message came out here.
#But if I change some of the variables to:
b-rnorm(nsims,0,1)*2
rn-rnorm(nsims,0,1)*2
a-b*r+rn*(1-r^2)^0.5
a-round(a)+7
a-a-g*2
b-round(b)+9
abs.1-function(x) ifelse(x5,5,x)
b-abs.1(b)
abs.2-function(x) ifelse(x1,1,x)
a-abs.2(a)
There is no poblem to complete the simulations.

_
 MSN 
 http://msn.com.tw
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] error message in simulation

2003-10-28 Thread Thomas W Blackwell
Yu-Kang  -

Simulations by their nature use randomly generated data.
Sometimes the random data doesn't contain enough information
to fully determine the parameter estimates for one iteration
or another.  It seems likely that that is what happened here.
The design matrix is singular for one iteration (maybe there
are NO simulated subjects in one arm of the trial) and
backsolve() very properly returns an error message.  On the
very next iteration, with a different randomly-generated data
set, everything should work, again.

The function  try()  allows you to get past these problematic
iterations.  It's better, of course, to figure out what the
requirements for a fully-specified data set are, and arrange
the random generator so that these are guaranteed to be met.

-  tom blackwell  -  u michigan medical school  -  ann arbor  -

On Tue, 28 Oct 2003, Tu Yu-Kang wrote:

 Dear R-users,

 I am a dentist (so forgive me if my question looks stupid) and came across
 a problem when I did simulations to compare a few single level and two
 level regressions.

 The simulations were interrupted and an error message came out like 'Error
 in MEestimate(lmeSt, grps) : Singularity in backsolve at level 0, block 1'.

 My collegue suggested that this might be due to my codes was not efficient
 and ran out of memory.  If this is the reason, could you please help me
 improve my codes writing.

 However, as I slightly changed the parameters, it ran well.  So I suspect
 memory is problem.

 I use R 1.8.0 and Windows XP professional.  My computer has a Pentium 4 2.4
 with 512 MB memory.

 Thanks in advance.

 best regards,

 Yu-Kang Tu

 Clinical Research Fellow
 Leeds Dental Institute
 University of Leeds

 ## change scores simulation
 close.screen(all=TRUE)
 split.screen(c(3,3))
 nitns-1
 nsims-100
 r-0.1
 param1-c(1:nitns)
 param2-c(1:nitns)
 param3-c(1:nitns)
 param4-c(1:nitns)
 param5-c(1:nitns)
 param6-c(1:nitns)
 param7-c(1:nitns)
 param8-c(1:nitns)
 param9-c(1:nitns)
 param10-c(1:nitns)
 param11-c(1:nitns)
 param12-c(1:nitns)
 param13-c(1:nitns)
 param14-c(1:nitns)
 for(itn in 1:nitns){
 g-rbinom(nsims,1,0.5)
 b-rnorm(nsims,0,1)*10
 rn-rnorm(nsims,0,1)*10
 a-b*r+rn*(1-r^2)^0.5
 a-round(a)+50
 a-a-g*5
 b-round(b)+50
 abs.2-function(x) ifelse(x1,1,x)
 b-abs.2(b)
 c-b-a
 p-c/b
 lm1-lm(a~g)
 lm2-lm(c~g)
 lm3-lm(p~g)
 lm4-lm(a~b+g)
 gr-c(g,g)
 occasion-rep(0:1,c(nsims,nsims))
 occ-occasion-0.5
 ppd-c(b,a)
 h-rep(0,nsims)
 mb-mean(b)
 bppd-b-mb
 bappd-c(h,bppd)
 occgr-occ*gr
 subject-c(1:nsims)
 sub-c(subject,subject)
 library(nlme)
 lm5-lme(ppd~occ+gr+occgr,random=~1|sub)
 lm5f-fixed.effects(lm5)
 lm5c-as.matrix(lm5f)
 lm5a-anova(lm5)
 lm6-lme(ppd~occ+gr+occgr,random=~1|sub,method=ML)
 lm6f-fixed.effects(lm6)
 lm6c-as.matrix(lm6f)
 lm6a-anova(lm6)
 lm7-lme(ppd~occ+gr+occgr+bappd,random=~1|sub,method=ML)
 lm7f-fixed.effects(lm7)
 lm7c-as.matrix(lm7f)
 lm7a-anova(lm7)
 param1[itn]-coef(summary(lm1))[2,1]
 param2[itn]-coef(summary(lm2))[2,1]
 param3[itn]-coef(summary(lm3))[2,1]
 param4[itn]-coef(summary(lm4))[3,1]
 param5[itn]-lm5c[4,1]
 param6[itn]-lm6c[4,1]
 param7[itn]-lm7c[4,1]
 param8[itn]-coef(summary(lm1))[2,4]
 param9[itn]-coef(summary(lm2))[2,4]
 param10[itn]-coef(summary(lm3))[2,4]
 param11[itn]-coef(summary(lm4))[3,4]
 param12[itn]-lm5a[4,4]
 param13[itn]-lm6a[4,4]
 param14[itn]-lm7a[4,4]
 }
 #the error message came out here.
 #But if I change some of the variables to:
 b-rnorm(nsims,0,1)*2
 rn-rnorm(nsims,0,1)*2
 a-b*r+rn*(1-r^2)^0.5
 a-round(a)+7
 a-a-g*2
 b-round(b)+9
 abs.1-function(x) ifelse(x5,5,x)
 b-abs.1(b)
 abs.2-function(x) ifelse(x1,1,x)
 a-abs.2(a)

 There is no poblem to complete the simulations.

 _
  MSN 
  http://msn.com.tw

 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help


__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Error message in non linear regression model

2003-09-08 Thread Douglas Bates
anne [EMAIL PROTECTED] writes:

 Hello!
 
 Trying to fit a non linear regression model
 
  modF-nlsModel(kf~3*alpha*epsilon^P, dat, list(alpha=ALPHA))

You should use nls, not nlsModel.

Also, if P is fixed then this is a linear regression model.  Why use
nonlinear regression.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] error message in nlm()

2003-09-01 Thread Thomas W Blackwell
Johannes  -

There's something special about the way control parameters are
accepted by  nlm() and nlme().  Try searching very recent help
archives for nlme() or control.  Try duplicating exactly one of
the examples at the bottom of the help page  help(nlm).  My
recollection is that the parameter that you actually pass has
to be literally a function, maybe one with a specific name.
But that's jsut vague recollection.  Others will have better
information.

-  tom blackwell  -  u michigan medical school  -  ann arbor  -

On Mon, 1 Sep 2003, [iso-8859-1] Hüsing, Johannes wrote:

 I have been trying the nlm function but received an error message
 which reads:

 Error in nlm(intensities ~ f, c(epsilon.spec.start,
 epsilon.unspec.start,  :
   invalid function value in 'nlm' optimizer

 The error message is issued after the second call to the function that
 nlm minimizes over.

 Could you give any suggestions on what I could be mishandling?
 Johannes

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] error message in fitdistr

2003-08-14 Thread vincent . stoliaroff
Hi R lovers

Here is a numerical vector test
 test
  [1] 206  53 124 112  92  77 118  75  48 176  90  74 107 126  99  84 114
147  99 114  99  84  99  99  99  99  99 104   1 159 100  53
 [33] 132  82  85 106 136  99 110  82  99  99  89 107  99  68 130  99  99
110  99  95 153  93 136  51 103  95  99  72  99  50 110  37
 [65] 102 104  92  90  94  99  76  81 109  91  98  96 104 104  93  99 125
89  99  99 108  90 105  92 106 103  99  99  99  94 102 103
 [97]  97  99 118  91 110  99  99  99  98 105  99  97  99 101  95  98  99
102  99  99  99  99  95  93  86  96 113  87 112 120  71  99
[129]  99  81  96 113  85 116 112  84 120  88  97 104  99 105 153 103  92
99  99  99  90 108 104  99 105  97  94  93  99  85  91  99
[161] 118  99  91  99 103 101 102  96  99 123  85 101  88  99  93  73  97
89  94  69  74  99  97  91  92

Assuming it follows a lognormal distribution I'd like to determine the mean
and the sd thanks to maximum likelihood estimation

 fitdistr(test,lognormal,start=list(200,10))
Error in print.fitdistr(structure(list(estimate = c(4.54666263736726,  :
more elements supplied than there are to replace

I chose the parameter start randomly

I don't understand the error message. Has anybody ever encountered such
one?
thanks for the help

have a wonderful day




**
The sender's email address has changed to 
firstname.lastname@ sgcib.com. You may want to update your 
personal address book. Please see http://www.sgcib.com for more 
information.
   **
This message and any attachments (the message) are confide...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


  1   2   >