Re: [R] geoRglm with factor variable as covariable

2012-10-07 Thread Filoche
Thank you Ruben. You were absolutly right. I'm using trend option now to specify my model. Thank for the help, Phil -- View this message in context: http://r.789695.n4.nabble.com/geoRglm-with-factor-variable-as-covariable-tp4645067p4645310.html Sent from the R help mailing list archive at

Re: [R] two indirect effects of path analysis

2012-10-07 Thread yrosseel
On 10/07/2012 02:17 AM, Elaine Kuo wrote: Hello, This is Elaine. I am trying a path analysis using lavaan Package. There are three explanatory variables: X, Z, and M. The response variable is Y. A, b, and c have direct effects on Y. On the other hand, X and Z also have direct effects on M.

Re: [R] vector is not assigned correctly in for loop

2012-10-07 Thread 周果
Thank you all for helping me out. As Michael points out, I abused the rounding and formatting of print() while debugging. The default number of digits to print is 7 according to ?print.default, which makes floating point numbers to be somewhat plausible for index vector subsetting at first glance:

Re: [R] Test for Random Points on a Sphere

2012-10-07 Thread 周果
Hi Lorenzo, Just a quick thought, the uniform probability density on a unit sphere is 1 / (4pi), what about binning those random points according to their directions and do a chi-square test? Regards, Guo On Sun, Oct 7, 2012 at 2:16 AM, cbe...@tajo.ucsd.edu wrote: Lorenzo Isella

[R] get: problem with environments

2012-10-07 Thread Martin Ivanov
Dear R users, I am running R-2.15.1 in Linux Slackware64-14.0. Here is my minimal working example: testfun - function (x) { a - 0; sapply(X=a, FUN=get, envir=sys.frame(which=x)); } Inside R, that is R called from within a Linux terminal, the following code works: testfun(x=5)

Re: [R] get: problem with environments

2012-10-07 Thread R. Michael Weylandt
On Sun, Oct 7, 2012 at 10:16 AM, Martin Ivanov tra...@abv.bg wrote: Dear R users, I am running R-2.15.1 in Linux Slackware64-14.0. Here is my minimal working example: testfun - function (x) { a - 0; sapply(X=a, FUN=get, envir=sys.frame(which=x)); } Inside R, that is R called from

Re: [R] get: problem with environments

2012-10-07 Thread Rui Barradas
Hello, No, I can't confirm the behavior the op sees. I've tried it in an R terminal on ubuntu 12.04, rkward on ubuntu, and RGui on Windows 7. R version 2.15.1. Here's the rkward sessionInfo. sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1]

Re: [R] get: problem with environments

2012-10-07 Thread arun
Hi, I am getting the same error message as Michael got (R terminal (R 2.15) on Ubuntu 12.04).   testfun(x=5) #Error in sys.frame(which = x) : not that many frames on the stack  print(testfun(x=6)) #Error in sys.frame(which = x) : not that many frames on the stack A.K. - Original Message

Re: [R] (no subject)

2012-10-07 Thread Rui Barradas
Hello, You must install the appropriate package(s). Try, for instance, install.packages('rugarch') # do this only once And then, every time you start an R session, if you want to use it, library(rugarch) # do this every R session To know more, try help('rugarch') vignette(package =

[R] Computing for Data Analysis ~ R

2012-10-07 Thread Brigettebrenda
Do to work schedules, I may have to discontinue. I really like this course and wish to finish. When is this course offered again, and if so, can I take again? Or, do we have to submit my even the hard deadlines? I can continue if we do not have to submit even by the hard deadline. I am

Re: [R] get: problem with environments

2012-10-07 Thread R. Michael Weylandt
On Sun, Oct 7, 2012 at 12:33 PM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, No, I can't confirm the behavior the op sees. I've tried it in an R terminal on ubuntu 12.04, rkward on ubuntu, and RGui on Windows 7. R version 2.15.1. Here's the rkward sessionInfo. sessionInfo() R version

Re: [R] Presence/ absence data from matrix to single column

2012-10-07 Thread agoijman
The problem with that, is that I just wrote an example of my database, but I have around 250 species and more than 500 sites. In the approach you show me, it looks like I have to enter every species name and sites individually, right? -- View this message in context:

[R] a merge() problem

2012-10-07 Thread Sam Steingold
I know it does not look very good - using the same column names to mean different things in different data frames, but here you go: --8---cut here---start-8--- x - data.frame(a=c(1,2,3),b=c(4,5,6)) y - data.frame(b=c(1,2),a=c(a,b))

[R] Problem with national characters in main, xlab, ylab with pdf{grDevices} / postscript {grDevices}

2012-10-07 Thread Magdalena A. Tkacz
Hello. I'm trying to make some graphics with nationalized labels (pdf for use in LaTeX document). On console (displayed on screen) using all looks ok: \/ data-rnorm(100) hist(data,main='Rozkład gęstości punktów', xlab='Wartość na osi y', ylab='Częstość

Re: [R] get: problem with environments

2012-10-07 Thread Martin Ivanov
Thank You very much for Your replies. Dear Michael, Does this persist after a new session (perhaps running as R --vanilla) and/or reinstall? Yes, it does. After running R --vanilla, still there are 4 contexts more on the call stack. You didn't show us how you tried to use parent.frame() I

Re: [R] Computing for Data Analysis ~ R

2012-10-07 Thread David Winsemius
This is not the mailing list for any course. -- On Oct 7, 2012, at 12:27 AM, brigettebre...@aol.com wrote: Do to work schedules, I may have to discontinue. I really like this course and wish to finish. When is this course offered again, and if so, can I take again? Or, do we have to

Re: [R] a merge() problem

2012-10-07 Thread Peter Ehlers
On 2012-10-07 08:34, Sam Steingold wrote: I know it does not look very good - using the same column names to mean different things in different data frames, but here you go: --8---cut here---start-8--- x - data.frame(a=c(1,2,3),b=c(4,5,6)) y -

Re: [R] Problem with national characters in main, xlab, ylab with pdf{grDevices} / postscript {grDevices}

2012-10-07 Thread Prof Brian Ripley
'National': not my nation, and none is stated. Somewhere in Eastern Europe ... Poland? Short answer: you need to use a family which contains those glyphs (try family='NimbusSan': the default 'Helvetica' does not) *and* a viewer that uses fonts that do. Longer answer: read ?pdf and

[R] Testing volatility cluster (heteroscedasticity) in stock return?

2012-10-07 Thread Eko andryanto Prakasa
Dear All, i want to use garch model in return of stock. and the data should presence volatility cluster (Heteroscedasticity). Do you know how to test volatility cluster (the presence of heteroscedasticity) in series data of stock return in R? Is it using Langrange Multiplier (LM) ARCH test?

Re: [R] a merge() problem

2012-10-07 Thread arun
Hi, Though, this does give the result you wanted when the column names are the same.  y1-y  colnames(y1)-c(a,b) merge(x,y1,by=a,all=TRUE,suffixes=c(,.y)) #  a b  b.y #1 1 4    a #2 2 5    b #3 3 6 NA A.K. - Original Message - From: Sam Steingold s...@gnu.org To: r-help@r-project.org

Re: [R] Testing volatility cluster (heteroscedasticity) in stock return?

2012-10-07 Thread R. Michael Weylandt
Hi Eko, Please don't cross-post to both R-Help and R-SIG-Finance. Michael On Sun, Oct 7, 2012 at 6:49 PM, Eko andryanto Prakasa eko.prak...@yahoo.com wrote: Dear All, i want to use garch model in return of stock. and the data should presence volatility cluster (Heteroscedasticity). Do you

Re: [R] a merge() problem

2012-10-07 Thread Peter Ehlers
On 2012-10-07 10:50, arun wrote: Hi, Though, this does give the result you wanted when the column names are the same. y1-y colnames(y1)-c(a,b) merge(x,y1,by=a,all=TRUE,suffixes=c(,.y)) # a b b.y #1 1 4a #2 2 5b #3 3 6 NA A.K. Yes, because 'b' is _not_ a 'by'-name. Peter Ehlers

Re: [R] Presence/ absence data from matrix to single column

2012-10-07 Thread Rui Barradas
Hello, I haven't been following this thread but apparently the answer to your worries is no. You can use a combination of names() and grep() to sort it out. something like #nms - names(adat) nms - c(Year, Route, Point, paste0(Sp, 1:250)) pattern - ^Sp[[:digit:]]+$ whichCols - grep(pattern,

Re: [R] Testing volatility cluster (heteroscedasticity) in stock return?

2012-10-07 Thread Eko andryanto Prakasa
Hi Michael, I'm sorry for the mistake.. i don't know if it's not permitted to sent the same message to both (r-help and r-sig) Thank's a lot for the information... Eko   - Original Message - From: R. Michael Weylandt michael.weyla...@gmail.com To: Eko andryanto Prakasa

Re: [R] Presence/ absence data from matrix to single column

2012-10-07 Thread arun
Hi, I guess you are not talking about the melt() method. dat1-read.table(text= Year    Route    Point    Sp1    Sp2    Sp3 2004    123    123-1    0    1    0 2004    123    123-2    0    1    1 2004    123    123-10    1    1    0 ,header=TRUE,sep=,stringsAsFactors=FALSE) #If all the Sp columns

Re: [R] Problem with national characters in main, xlab, ylab with pdf{grDevices} / postscript {grDevices}

2012-10-07 Thread Magdalena A. Tkacz
Hello. Yes, you're right -Poland, Central/Eastern Europe. My apologies - my fault - not to state it directly in post. Than you for your advice, especially concerning viewer (when OS is Win). Under Windows (checked both on english and polish version of OS) works fine with font family you

[R] gam error message: matrix not +ve definite

2012-10-07 Thread garth
Hello, I'm running a multimodel analysis which involves fitting several GAM models as implemented in package mgcv. The issue I'm having is that when I try to fit my model, gam gives me the following error message: 'Error in initial.sp(w * X, S, off) : S[[2]] matrix is not +ve definite.' The

[R] BioConductor package: 'oligo'

2012-10-07 Thread Johnson, Franklin Theodore
Dear Help, After loading the pd.Citrus library and checking the DataFrame, I ran the R code for: 1) 'oligo' { library(pd.citrus) Loading required package: RSQLite Loading required package: DBI data(pmSequence) show(pmSequence) DataFrame with 341730 rows and 2 columns fid

Re: [R] Format of numbers in plotmath expressions.

2012-10-07 Thread William Dunlap
In-line comments below. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Rolf Turner Sent: Friday, October 05, 2012 5:02 PM To: Uwe Ligges Cc: r-help@r-project.org

Re: [R] BioConductor package: 'oligo'

2012-10-07 Thread R. Michael Weylandt
Hi Franklin, As you note, this is a bioconductor package, and they have a separate mailing list for support (fully of terribly knowledgeable and responsive folks) I know it's somewhat unpleasant to be told to look elsewhere after you've spent a good amount of time on it already, but I think it's

Re: [R] gam error message: matrix not +ve definite

2012-10-07 Thread R. Michael Weylandt
On Sun, Oct 7, 2012 at 3:00 PM, garth dbo...@dal.ca wrote: Hello, I'm running a multimodel analysis which involves fitting several GAM models as implemented in package mgcv. The issue I'm having is that when I try to fit my model, gam gives me the following error message: 'Error in

Re: [R] Testing volatility cluster (heteroscedasticity) in stock return?

2012-10-07 Thread R. Michael Weylandt
On Sun, Oct 7, 2012 at 7:59 PM, Eko andryanto Prakasa eko.prak...@yahoo.com wrote: Hi Michael, I'm sorry for the mistake.. i don't know if it's not permitted to sent the same message to both (r-help and r-sig) Thank's a lot for the information... Eko No worries, it's a common enough

Re: [R] Presence/ absence data from matrix to single column

2012-10-07 Thread David L Carlson
You should keep the context of your thread intact for those of us using email instead of Nabble. The locations were not listed individually anywhere in the reshape() command. I listed Point as the id variable so reshape would use that to create row names, but if you delete idvar=Point, reshape

[R] Robust regression for ordered data

2012-10-07 Thread Eiko Fried
I have two regressions to perform - one with a metric DV (-3 to 3), the other with an ordered DV (0,1,2,3). Neither normal distribution not homoscedasticity is given. I have a two questions: (1) Some sources say robust regression take care of both lack of normal distribution and

Re: [R] a merge() problem

2012-10-07 Thread Sam Steingold
* Peter Ehlers ruy...@hpnytnel.pn [2012-10-07 10:03:42 -0700]: On 2012-10-07 08:34, Sam Steingold wrote: I know it does not look very good - using the same column names to mean different things in different data frames, but here you go: --8---cut

Re: [R] Robust regression for ordered data

2012-10-07 Thread Jeff Newmiller
This does not appear to be a question about R. You should post in a list or forum dedicated to discussing statistics theory, such as stats.stackoverflow.com. --- Jeff NewmillerThe .

Re: [R] Robust regression for ordered data

2012-10-07 Thread Eiko Fried
Thank you Jeff! Please ignore the first of my two questions then, and apologies for not making it clear that my second question was about R. (2) Are there ways of using robust regressions with ordered data ... in R? Thank you On 7 October 2012 18:26, Jeff Newmiller jdnew...@dcn.davis.ca.us

Re: [R] Presence/ absence data from matrix to single column

2012-10-07 Thread Andrea Goijman
Ill try this one as well. And I guess the one below is not going to work, because all my species have different names. Thanks! #nms - names(adat) nms - c(Year, Route, Point, paste0(Sp, 1:250)) pattern - ^Sp[[:digit:]]+$ whichCols - grep(pattern, nms) whichNames - nms[whichCols] reshape(...,

Re: [R] Robust regression for ordered data

2012-10-07 Thread Bert Gunter
Have you checked the Robust task view on CRAN?? Would seem that that should have been the first place to look. -- Bert On Sun, Oct 7, 2012 at 3:30 PM, Eiko Fried tor...@gmail.com wrote: Thank you Jeff! Please ignore the first of my two questions then, and apologies for not making it clear that

Re: [R] Robust regression for ordered data

2012-10-07 Thread Jeff Newmiller
I don't know about the topic of your question. Have you used the RSiteSearch function to research it yourself? --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.us

[R] dist based kmeans clustering

2012-10-07 Thread eliza botto
Dear useRs, i have a matrix X and i generated a distance matrix of X, let us call it Y. I did hierarchical clustering of Y and got some results. I just wanted to know that can i use the same distance matrix Y in Kmeans clustering? If not, then how can i use my own distance matrix for kmeans

Re: [R] Presence/ absence data from matrix to single column

2012-10-07 Thread Rui Barradas
Hello, If all your species have different names, you can allways try one of 1. if the non-species follow a pattern, negate those columns and you'll have the species columns. 2. are the species the last columns? Use positional referencing. Rui Barradas Em 08-10-2012 00:16, Andrea Goijman

Re: [R] Presence/ absence data from matrix to single column

2012-10-07 Thread arun
HI, Sorry, I complicated a code where it was not required at all. Just using colnames(dat1)[4:6] or names(dat1)[4:6] should work if the species columns are adjacent to each other.

Re: [R] multinomial MCMCglmm

2012-10-07 Thread Ben Bolker
Vaniscotte vanamelie at gmail.com writes: Dear all, I would like to add mixed effects in a multinomial model and I am trying to use MCMCglmm for that. [snip] ill-conditioned G/R structure: use proper priors if you haven't or rescale data if you have I guess that the problem

Re: [R] a merge() problem

2012-10-07 Thread Peter Ehlers
On 2012-10-07 14:44, Sam Steingold wrote: * Peter Ehlers ruy...@hpnytnel.pn [2012-10-07 10:03:42 -0700]: On 2012-10-07 08:34, Sam Steingold wrote: I know it does not look very good - using the same column names to mean different things in different data frames, but here you go:

[R] Removing header from a matrix

2012-10-07 Thread Dereje Bacha
I have three column vectors (X1, X2, X3).      X1  X2  X3    20   25  40    100 90  80 I want to put them as one matrix of dimention 2 by 3,  but remove headers(X1,X2,X3) from the matrix. I wrote as follows U-cbind (X1,X2,X3) the headers are there. I need help please. Thanks Dereje

Re: [R] Removing header from a matrix

2012-10-07 Thread Jeff Newmiller
You need to clarify what you have and what you want. Please use the dput() function to create a reproducible example that we can enter into R to make suggestions about. [1] There are a couple of possible things that could be going on here, and what you have given so far is ambiguous. [1]

Re: [R] Removing header from a matrix

2012-10-07 Thread David L Carlson
These are just column names, but if you want to remove them, it is easy: X1 - c(20, 100) X2 - c(25, 90) X3 - c(40, 80) U - cbind(X1, X2, X3) U X1 X2 X3 [1,] 20 25 40 [2,] 100 90 80 colnames(U) - NULL U [,1] [,2] [,3] [1,] 20 25 40 [2,] 100 90 80

[R] nlminb problem, convergence error code = 1

2012-10-07 Thread zugi young
Hi, I was trying to do a multi-level modeling of the data using the nlme package. I encounter the following message: addRandomSlopeRange- lme(FAN.range ~ CHN.range + Age + Block.T, data=data.block, random = ~CHN.range|CHI, method = ML, na.action=na.omit) Error in lme.formula(FAN.range ~

Re: [R] a merge() problem

2012-10-07 Thread Prof Brian Ripley
On 08/10/2012 02:57, Peter Ehlers wrote: On 2012-10-07 14:44, Sam Steingold wrote: * Peter Ehlers ruy...@hpnytnel.pn [2012-10-07 10:03:42 -0700]: On 2012-10-07 08:34, Sam Steingold wrote: I know it does not look very good - using the same column names to mean different things in different

Re: [R] problem with convergence in mle2/optim function

2012-10-07 Thread Adam Zeilinger
Dear R Help, Thank you to those who responded to my questions about mle2/optim convergence. A few responders pointed out that the optim error seems to arise when either one of the probabilities P1, P2, or P3 become negative or infinite. One suggested examining the exponential terms within

Re: [R] Robust regression for ordered data

2012-10-07 Thread Prof Brian Ripley
On 08/10/2012 00:37, Bert Gunter wrote: Have you checked the Robust task view on CRAN?? Would seem that that should have been the first place to look. It is still a conceptual question. I presume this means an ordered response, and then we need to know what is meant by 'regression'. If you