Re: [R] Another SEM question

2009-07-21 Thread Stein, Luba (AIM SE)
Thank you for your advice. So I am sending the whole code data.dir - file.path(home.dir, Data) file - file.path(data.dir, data4.csv) SEM - read.csv(file) print(SEM) library(sem) SEM1 - as.matrix(cbind(SEM$R1, SEM$I1, SEM$M1)) print(SEM1) mod.cov - cov(SEM1) print(mod.cov) I - SEM$I1 M -

Re: [R] Another SEM question

2009-07-21 Thread Jarrett Byrnes
You don't appear to be defining Z here. Might that be the problem? Or, I, M, and R may not be defined either. It is unclear. What does mod.cov look like? On Jul 20, 2009, at 11:11 PM, Stein, Luba (AIM SE) wrote: Thank you for your advice. So I am sending the whole code data.dir -

[R] [R-pkgs] new package 'dlnm' to run distributed lag non-linear models

2009-07-21 Thread Antonio.Gasparrini
Dear R Community, I am pleased to announce the release of a new package called 'dlnm', now available on CRAN (version 0.2.1). The package dlnm provides some facilities to run distributed lag models (DLM's) and their non-linear extension (DLNM's), a modelling framework to describe

Re: [R] Another SEM question

2009-07-21 Thread Stein, Luba (AIM SE)
Hi, [,1] [,2] [,3] [1,] 4.820719e-03 -5.558801e-05 -5.718939e-05 [2,] -5.558801e-05 4.763194e-06 -7.661872e-06 [3,] -5.718939e-05 -7.661872e-06 1.662150e-03 This is mod.cov. It is the covariance matrix of (R, I, M). R, I and M are vectors of length 109 which

[R] legend title in qplot

2009-07-21 Thread rajesh j
Hi, I've used the following command in qplot qplot(a$V1,geom=histogram,binwidth=0.15,fill = factor(a$V2),ylab=Frequency,xlab=Rate); but the title in the legend shows up as factor(a$V2)...how can i change this? -- Rajesh.J [[alternative HTML version deleted]]

Re: [R] heatmap plot

2009-07-21 Thread Michael Knudsen
2009/7/21 Markus Mühlbacher muehli...@yahoo.com: So just that I understand right. x and y are the scalings of the x and y axis and the matrix represents the color of the points at each gridpoint? Precisely! Try ?image for more details. -- Michael Knudsen micknud...@gmail.com

Re: [R] class export in package creation / setClass / namespace?

2009-07-21 Thread Martin Maechler
MartinMo == Martin Morgan mtmor...@fhcrc.org on Mon, 20 Jul 2009 18:57:33 -0700 writes: MartinMo L L lmla...@gmail.com writes: Ok, I could solve also the latter problem by defining show.myclass function in the zzz.R file and adding the line 'S3method(show,myclass)' into

Re: [R] Show representation of a data structure

2009-07-21 Thread Paul Hiemstra
bwgoudey schreef: I'm currently working with some large complex data structures eg list of lists of data_frames containing lots more variables and lists etc. Sometimes, I'd like to be able to bring up a simple representation of the structure I'm working with, minus all of the values it

Re: [R] Another SEM question

2009-07-21 Thread Jarrett Byrnes
Ah, the larger problem is in how you specify your model. You provide no parameter names, nor starting estimates (even an NA). See the sem help file for an example. Basically, it must look something like as follows model - specify.model() Z - M, zm, NA Z - I, zi, NA etc. On Jul 20,

Re: [R] Another SEM question

2009-07-21 Thread Stein, Luba (AIM SE)
Hello, Perhaps this is a good point. I use the Eclipse platform. The problem was that when I first used the structure Z - M, z1, NA the compiler took only the value Z -M. Thus I erased it totally. Maybe it is really an Eclipse problem. Do you know how to solve this difficulty? Thanks for all

[R] error when installing rjags

2009-07-21 Thread markleeds
Hi All: I get the following error when trying to install the rjags package. I've installed the jags software and I'm using Fedora 10.0 and my sessionInfo is at the bottom of this email. I'm also sorry if this email ends up having control A's all over it. I still haven't figured

Re: [R] Another SEM question

2009-07-21 Thread Stein, Luba (AIM SE)
Hello Jarrett, Thank you very much indeed for your help. I could solve my problem and you were right that I had to choose the connections in the model right. Thus the entry model - specify.model() Z - M, z1, NA Z - USM, z2, NA Z - R, z3, 1 M - M USM - USM R - R Z - Z works and gave me moreover

[R] problem installing cairo on freebsd

2009-07-21 Thread Ben Madin
G'day all, I am trying to install the cairo package on FreeBSD and receiving an error to do with Makevars - (I'm not very good at this stuff) so here is my various bits of information. I guess this is a problem with a missing library, but I have just been through a lot of grief trying to

Re: [R] I might be dumb : a simple question about foreach

2009-07-21 Thread Olivier ETERRADOSSI
Many thanks David for making the connection betweeen the two reports. If I understand, other french users may have faced the same problem... However I'll wait until it's solved to have a look at foreach. Regards. Olivier David M Smith a écrit : A user in Japan reported a similar problem on the

Re: [R] Another SEM question

2009-07-21 Thread Stein, Luba (AIM SE)
Hello, Perhaps this is a good point. I use the Eclipse platform. The problem was that when I first used the structure Z - M, z1, NA the compiler took only the value Z -M. Thus I erased it totally. Maybe it is really an Eclipse problem. Do you know how to solve this difficulty? Thanks for all

[R] Merging lot of zoo objects

2009-07-21 Thread RON70
Hi, I have 100 price data series like price1, price2, price3, . All are zoo objects. Now I want to merge all them together. Obviously I can do this using merge(price1, price2, price3, ). However as I have lot of price series (almost 1000) above systax is very tiresome. Is

Re: [R] Re gression for loop test HELP! URGENT!

2009-07-21 Thread Rbeginner
Hi Daniel, Thanks for the insight. My apologies for the unclearness of my original question. I have calculated the fit and se.fit values, see below predict(fm,newdata=test, se.fit=TRUE, type=c(response)) If I wasn't mistaking, this would give me the fit values and the standard errors. I just

Re: [R] Re gression for loop test HELP! URGENT!

2009-07-21 Thread Rbeginner
Hi Daniel, Thanks for the insight. My apologies for the unclearness of my original question. I have calculated the fit and se.fit values, see below predict(fm,newdata=test, se.fit=TRUE, type=c(response)) If I wasn't mistaking, this would give me the fit values and the standard errors. I just

Re: [R] Merging lot of zoo objects

2009-07-21 Thread Michael Knudsen
On Tue, Jul 21, 2009 at 9:07 AM, RON70ron_michae...@yahoo.com wrote: I have 100 price data series like price1, price2, price3, . All are zoo objects. Now I want to merge all them together. Obviously I can do this using merge(price1, price2, price3, ). However as I have lot

[R] Updating an object

2009-07-21 Thread megh
Let say, I have an arbitrary vector : i=1 assign(paste(dat,i,sep=), rnorm(5)) Now I want to update that dat1 vector by ommiting last 2 elements i.e. dat1 = dat1[c(1:3)] However here my problem is, as dat1 depends on another variable i, I cannot use above syntax directly. I want to automate

[R] Argument problem in function wrapper

2009-07-21 Thread Usuario R
Dear all, we are writing a wrapper for the nls function in library stats. We are having a problem with one of the arguments (weightsArgument) which seems not to reach nls even if we explicitly assign it in the function call. We are attaching the simplest code reproducing the error and the output

Re: [R] legend title in qplot

2009-07-21 Thread baptiste auguie
?scale_fill_discrete() qplot(x,y,data=data.frame(x=1,y=1,f=a),fill=f) + scale_fill_discrete(test) baptiste HTH, 2009/7/21 rajesh j akshay.raj...@gmail.com Hi, I've used the following command in qplot qplot(a$V1,geom=histogram,binwidth=0.15,fill = factor(a$V2),ylab=Frequency,xlab=Rate);

Re: [R] Merging lot of zoo objects

2009-07-21 Thread Achim Zeileis
On Tue, 21 Jul 2009, Michael Knudsen wrote: On Tue, Jul 21, 2009 at 9:07 AM, RON70ron_michae...@yahoo.com wrote: I have 100 price data series like price1, price2, price3, . All are zoo objects. Now I want to merge all them together. Obviously I can do this using merge(price1,

[R] [R-pkgs] new package: exact2x2

2009-07-21 Thread Fay, Michael (NIH/NIAID) [E]
Hi all, I have just uploaded a new package to the ftp site called exact2x2. The package does exact conditional tests for 2x2 tables. Specifically, it does Fisher's exact test and Blaker's exact test (see Blaker, 2000, Canadian Journal of Statistics, 783-798). The motivation for the package is

Re: [R] Zinb for Non-interger data

2009-07-21 Thread Vito Muggeo (UniPa)
I think that the (impressive) gamlss package (see http://www.gamlss.com) may be helpful. If I remember correctly, in gamlss you can fit model with zero-inflated continuous distributions hope this helps you, vito Alain Zuur ha scritto: JPS2009 wrote: Sorry bit of a Newbie question, and I

Re: [R] Too many open files

2009-07-21 Thread Allan Engelhardt
This seriously looks like a bug in load(): the gzcon() magic in the code leaves the connection open. On Linux x86_64 I can do: file.name - /tmp/foo.RData data - runif(10) save(data, file=file.name) for ( i in 1:4000 ) { con - gzfile(file.name, rb); load(file=con); close(con); } ## No

Re: [R] Too many open files

2009-07-21 Thread Uwe Ligges
Allan Engelhardt wrote: This seriously looks like a bug in load(): the gzcon() magic in the code leaves the connection open. On Linux x86_64 I can do: Have you tried very recent R-devel (which you always should do before reporting bugs)? From the svn logs:

Re: [R] Too many open files

2009-07-21 Thread Duncan Murdoch
On 21/07/2009 5:00 AM, Allan Engelhardt wrote: This seriously looks like a bug in load(): the gzcon() magic in the code leaves the connection open. On Linux x86_64 I can do: It was a bug (in gzcon, not load), and has now been fixed. file.name - /tmp/foo.RData data - runif(10) save(data,

Re: [R] Re gression for loop test HELP! URGENT!

2009-07-21 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 21.07.2009 09:18:51: Hi Daniel, Thanks for the insight. My apologies for the unclearness of my original question. I have calculated the fit and se.fit values, see below predict(fm,newdata=test, se.fit=TRUE, type=c(response)) If I wasn't

Re: [R] Correction.

2009-07-21 Thread Ted Harding
On 21-Jul-09 01:24:04, Rolf Turner wrote: It has been pointed out to me that I erred in an earlier post. ``Go stick your head in a pig.'' is not the motto of the (entire) Sirius Cybernetics Corporation. It is the motto if the Sirius Cybernetics Corporation ***Complaints Division***. My

Re: [R] kmeans.big.matrix

2009-07-21 Thread Allan Engelhardt
The kmeans.big.matrix function seems to have disappeared between the 2.3 and the 3.5 release of the library. (?) I am not sure why. You can download old versions from CRAN. The default package on Fedora (R-bigmemory-2.3-4.fc11.x86_64 or similar for your platform) also has the function (from

[R] read floats from file into array

2009-07-21 Thread leo mueller
hi all, i have a simple question. instead of defining my measurements in a static way like ... x - c(-0.475, -1.553, -0.434, -1.019, 0.395) ... i'd like them to be read from a file ... x - read.table(07a673ac0cb1f7f8fa293860566f633c/1/raw0.txt, header=FALSE) d1 - density(x, kernel = gaussian)

Re: [R] read floats from file into array

2009-07-21 Thread Allan Engelhardt
read.table() returns a data.frame by default. Try str(x). Options: d1 - density(x[[1]], kernel = gaussian) or x - scan(07a673ac0cb1f7f8fa293860566f633c/1/raw0.txt) Hope this helps Allan. On 21/07/09 11:09, leo mueller wrote: hi all, i have a simple question. instead of defining my

Re: [R] read floats from file into array

2009-07-21 Thread Duncan Murdoch
On 21/07/2009 6:09 AM, leo mueller wrote: hi all, i have a simple question. instead of defining my measurements in a static way like ... x - c(-0.475, -1.553, -0.434, -1.019, 0.395) ... i'd like them to be read from a file ... x - read.table(07a673ac0cb1f7f8fa293860566f633c/1/raw0.txt,

Re: [R] moving columns on a stripchart closer together

2009-07-21 Thread S Ellison
I agree; the stripchart defaults place things too close to the edges for 'neat' layout. Use at= coupled with ylim (or xlim, if vertical) to place the rows explicitly and leave room at the margins. Extending the last example in ?stripchart: stripchart(decrease ~ treatment, main =

[R] Collinearity in Linear Multiple Regression

2009-07-21 Thread Alex Roy
Dear all, How can I test for collinearity in the predictor data set for multiple linear regression. Thanks Alex [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] lmom - Estimating Normal Distribution Parameters using lmom package

2009-07-21 Thread Maithili Shiva
Dear R helpers,   I have a data of 2102 observations (consisting of 0's also), to which I am trying to fit Normal distribution using lmom pacakage. If I use Excel, its easy to estimate the parameters of Normal distribution as simple mean and standard devaition. The results I get if I use teh

Re: [R] Collinearity in Linear Multiple Regression

2009-07-21 Thread John Sorkin
I suggest you start by doing some reading about Condition index (CI) and variation inflation factor (VIF). Once you have reviewed the theory, a search of search.r-project.org (under the help menu in a windows-based R installation) for VIF will help you obtain values for VIF, c.f.

[R] WISP-survey part of created area?

2009-07-21 Thread Anja Wittich
Dear R-Team! I am a beginner in R and use the WISP library for a project. I am using mark-recapture to estimate abundance. I would like to know if it is possible to only survey a part of the created area (with the created population) and not all of it. I am trying to quantify bias introduced by

Re: [R] read floats from file into array

2009-07-21 Thread leo mueller
big thanks to all, the x[[1]] worked fine! :) 2009/7/21 Duncan Murdoch murd...@stats.uwo.ca: On 21/07/2009 6:09 AM, leo mueller wrote: hi all, i have a simple question. instead of defining my measurements in a static way like ... x - c(-0.475, -1.553, -0.434, -1.019, 0.395) ... i'd like

[R] package quantreg behaviour in weights in function rq,

2009-07-21 Thread Václav Varvařovský
Dear all, I am having v.4.36 of Quantreg package and I noticed strange behaviour when weights were added. Could anyone please explain me what if the results are really strange or the behavioiur is normal. As an example I am using dataset Engel from the package and my own weights. x-engel[1:50,1]

Re: [R] Merging lot of zoo objects

2009-07-21 Thread Gabor Grothendieck
1. If the series are zoo series all starting with z, say, in the current workspace then: L - sapply(ls(pattern = ^z), get, simplify = FALSE) znew - do.call(merge, L) 2. If your data originally comes from a single file with a column that specifies which series that row pertains to then you can

[R] animated grid graphics

2009-07-21 Thread Unternährer Thomas
I need to make a fairly complex animated graphic and decided to use grid for it. A very simple example of what I need: ##== library(grid) grid.newpage() pushViewport(plotViewport()) pushViewport(viewport(xscale =

[R] how to use a list to create a plot

2009-07-21 Thread Graves, Gregory
I issued the following command to obtain the std dev for each month. psd-numSummary(Sal, groups=month, statistics=c(sd)) which resulted in psd sd n NA 1 6.930340 9367 2319 2 7.847003

Re: [R] Updating an object

2009-07-21 Thread Uwe Ligges
megh wrote: Let say, I have an arbitrary vector : i=1 assign(paste(dat,i,sep=), rnorm(5)) Now I want to update that dat1 vector by ommiting last 2 elements i.e. dat1 = dat1[c(1:3)] However here my problem is, as dat1 depends on another variable i, I cannot use above syntax directly. I want

[R] writte file doubt

2009-07-21 Thread Jose Narillos de Santos
Hi I wrotte this function but when I get the tmp.xls file it shows data in a rare way. I mean not appears a matrix with 2000 rows and 100 columns. Can anyone help me, guide me? kim-function(){ tmp-randz-matrix(rnorm(20, mean=0,sd=0.01 ),2000,100); dim(tmp) write(tmp,file=tmp.xls) Thanks

Re: [R] writte file doubt

2009-07-21 Thread Uwe Ligges
Jose Narillos de Santos wrote: Hi I wrotte this function but when I get the tmp.xls file it shows data in a rare way. I mean not appears a matrix with 2000 rows and 100 columns. Can anyone help me, guide me? kim-function(){ tmp-randz-matrix(rnorm(20, mean=0,sd=0.01 ),2000,100);

Re: [R] writte file doubt

2009-07-21 Thread Michael Knudsen
On Tue, Jul 21, 2009 at 2:28 PM, Jose Narillos de Santosnarillosdesan...@gmail.com wrote: Hi I wrotte this function but when I get the tmp.xls file  it shows data in a rare way. I mean not appears a matrix with 2000 rows and 100 columns. Can anyone help me, guide me? Short answer: ?write

Re: [R] how to use a list to create a plot

2009-07-21 Thread Uwe Ligges
Graves, Gregory wrote: I issued the following command to obtain the std dev for each month. psd-numSummary(Sal, groups=month, statistics=c(sd)) numSummary is not in base R, is it? If not, which package? Please read the posting guide! Please provide reproducible code (we do not have

Re: [R] geom_histogram help

2009-07-21 Thread Uwe Ligges
rajesh j wrote: Hi, I have a histogram.But I need seperate colours for fixed range of values.for eg. between 2-3 on the x axis a colour.3-4 another colour etc. and the legend has to say what each colour is.How can this be done in geom_histogram? geom_histogram Error: object

Re: [R] geom_histogram help

2009-07-21 Thread rajesh j
its a function in ggplot2 for plotting complicated histograms. 2009/7/21 Uwe Ligges lig...@statistik.tu-dortmund.de rajesh j wrote: Hi, I have a histogram.But I need seperate colours for fixed range of values.for eg. between 2-3 on the x axis a colour.3-4 another colour etc. and the

Re: [R] animated grid graphics

2009-07-21 Thread Paul Hiemstra
Hi, Drawing grid graphics always takes long, I would write the images to png's and make the animation. If you use Linux I can suggest some nice tools to do this. This movie is also much more compatible with all kinds of machines. It might be that you can get your grid animation working on

Re: [R] Updating an object

2009-07-21 Thread Ben Bolker
Uwe Ligges-3 wrote: megh wrote: Let say, I have an arbitrary vector : i=1 assign(paste(dat,i,sep=), rnorm(5)) Now I want to update that dat1 vector by ommiting last 2 elements i.e. dat1 = dat1[c(1:3)] However here my problem is, as dat1 depends on another variable i, I

[R] Forecasting - Croston Method Error

2009-07-21 Thread Pedro Souto
Hi, I tried to use the Croston function from the forecasting package 1.24http://robjhyndman.com/software/forecasting with the code below, but I get in return this message *Error in decompose(ts(x[1L:wind], start = start(x), frequency = f), seasonal) : time series has no or less than 2 periods*.

Re: [R] how to use a list to create a plot

2009-07-21 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 21.07.2009 14:37:35: Graves, Gregory wrote: I issued the following command to obtain the std dev for each month. psd-numSummary(Sal, groups=month, statistics=c(sd)) numSummary is not in base R, is it? If not, which package? Please

Re: [R] animated grid graphics

2009-07-21 Thread Allan Engelhardt
On 21/07/09 14:00, Paul Hiemstra wrote: Hi, Drawing grid graphics always takes long, I would write the images to png's and make the animation. If you use Linux I can suggest some nice tools to do this. Please do suggest! I was thinking about a similar problem. Allan.

Re: [R] animated grid graphics

2009-07-21 Thread Unternährer Thomas
Ups, I just realized that we have the possibility of using grid.remove(..., redraw = FALSE) which is more or less what I was looking for. But I'm still wondering if its possible to remove a viewport from a viewport tree:

Re: [R] geom_histogram help

2009-07-21 Thread John Kane
Without your code it is impossible to say why you are getting the error message. However, are you aware that you need to have a classifying variable to set the colours? Try this to see if it is something like what you want.

Re: [R] animated grid graphics

2009-07-21 Thread hadley wickham
Ups, I just realized that we have the possibility of using grid.remove(..., redraw = FALSE) which is more or less what I was looking for. But I'm still wondering if its possible to remove a viewport from a viewport tree: I've talked with Paul about this (for the general case of modifying

Re: [R] moving columns on a stripchart closer together

2009-07-21 Thread Uwe Ligges
Leslie J Seltzer wrote: Greetings I have a very simple question that I have not been able to solve by reading the manual. When I produce a stripchart with two straight columns of dots representing individual observations, one representing one group of subjects and the other representing

[R] Custom Link/Family for lmer

2009-07-21 Thread James Martin
Hello List, I am modeling a binomial response (nest survival) and I want to incorporate a random effect, in this case site. I had previously been using glm with a custom link function, but my understanding is that lmer does not currently allow a custom link. Therefore, I was investigating if

Re: [R] how to use a list to create a plot

2009-07-21 Thread John Kane
It looks like a data.frame to me. Try str(psd) or class(psd) to check. Typeof returns list for a data.frame since data.frame apparently is a subset of list. The 'months' that you are seeing are simply the rownames which by chance are the same as the months. I's suggest adding the months to

Re: [R] S_alloc or Calloc for return value

2009-07-21 Thread Dan Kelley
I'm afraid I am missing something. In my R function (call it foo, say) I am doing something like foo - function() { ... .C(bar, ..., res=integer(n), ...)$res } but I don't know the n to use; that is determined inside my C function bar. Is there a way around this?

Re: [R] more than one mathematical annotation into a legend

2009-07-21 Thread Uwe Ligges
Thomas Roth (geb. Kaliwe) wrote: in the legend there's x but not the value of x which actually should be shown... #does not work x = 2 plot(1:10) legend(4,4, expression(t[m] == x, t[n] == x)) If in separate lines, e.g.: legend(4, 4, do.call(expression, list( substitute(t[m] == x,

[R] Specifying initial values for arima.sim

2009-07-21 Thread Jack Liddle
Hi Everyone, I'm having a problem with arima.sim. Namely specifying inital values for the series. If I generate a random walk vs = rnorm(100,0,1) xs = cumsum(vs) and fit an ARIMA(1,0,0) to it xarima = arima(xs,order=c(1,0,0)) xarima Call: arima(x = xs, order = c(1, 0, 0)) Coefficients:

Re: [R] writte file doubt

2009-07-21 Thread Steve Lianoglou
On the other hand, everytime I execute a function that is locatd in my documents I must open it source(file.choose()) , there is a folder where to put my function to not necesessary run prevously source(file.choose()). See ?startup Rather: ?Startup -steve -- Steve Lianoglou Graduate

Re: [R] S_alloc or Calloc for return value

2009-07-21 Thread Dirk Eddelbuettel
On 21 July 2009 at 06:56, Dan Kelley wrote: | I'm afraid I am missing something. In my R function (call it foo, say) I | am doing something like | | foo - function() { | ... | .C(bar, ..., res=integer(n), ...)$res | } | | but I don't know the n to use; that is

Re: [R] lmom - Estimating Normal Distribution Parameters using lmom package

2009-07-21 Thread J. R. M. Hosking
Maithili Shiva wrote: Dear R helpers, I have a data of 2102 observations (consisting of 0's also), to which I am trying to fit Normal distribution using lmom pacakage. If I use Excel, its easy to estimate the parameters of Normal distribution as simple mean and standard devaition. The results

[R] problem with heatmap.2 in package gplots generating non-finite breaks

2009-07-21 Thread Mark Kimpel
I have written a wrapper for heatmap.2 called heatmap.w.row.and.col.clust which auto-generates breaks using breaks-round((c(seq(from=(-20 * stddev), to=(20 * stddev/20, digits = 2) #(stddev in this case = 2.5) This has always worked well in the past but now I am getting an error that

[R] ERCIM WG on Computing Statistics, Workshop on Cyprus, deadline July 31

2009-07-21 Thread Uwe Ligges
Dear useRs, you probably already noticed that the ERCIM (European Research Consortium for Informatics and Mathematics) Working Group on Computing Statistics will meet at its Second International Workshop, 29-31 October 2009, in Limassol, Cyprus. Several topics are covered, many of them

Re: [R] Re gression using age and Duration of disease as a continous factors

2009-07-21 Thread John Kane
--- On Mon, 7/20/09, 1Rnwb sbpuro...@gmail.com wrote: I thought this forum is for help. now i know what the statistician in my dept does all day long Clearly he's not talking to you. Your first step probably should be to go talk to him or her.

Re: [R] Another SEM question

2009-07-21 Thread Jarrett Byrnes
You should also need coefficients for your error terms. On Jul 21, 2009, at 12:36 AM, Stein, Luba (AIM SE) wrote: Hello Jarrett, Thank you very much indeed for your help. I could solve my problem and you were right that I had to choose the connections in the model right. Thus the entry

Re: [R] how to change the quantile method in bwplot

2009-07-21 Thread Jun Shen
Uwe, Thank you for your reply. I am still not very clear about the meanings of the arguments in the stats function. To make it clearer, quantile() uses type=7 as default method. I believe this is the method bwplot() uses to calculate the quantiles. I want to use type=6 method for bwplot(). How

Re: [R] problem with heatmap.2 in package gplots generating non-finite breaks

2009-07-21 Thread Mark Kimpel
Never mind, the problem seems to be that I have ignored the warning Using scale=row or scale=column when breaks arespecified can produce unpredictable results.Please consider using only one or the other. I just stop specifying the breaks and it works fine. Mark

[R] Function for Estimating Fractional Multinomial Logit Model?

2009-07-21 Thread GREGOR Brian J
I need to estimate a model that predicts the proportional split of travel among the vehicles of a household based on vehicle characteristics such as age, fuel economy, and travel cost per mile. The model estimation dataset has a record for each household vehicle with information about the vehicle,

[R] Preserving Symmetry Between Two Equations

2009-07-21 Thread Ferdogan
Hi, I have two products which are substitudes. I try to fix a system as below to mydata. Demand1 = A1 -B1*Price1 + C1*Price2 Demand2 = A2 +B2*Price1 - C2*Price2 I would expect C1 B2 to be symmetric, If they are truly substitude. How can I enforce this symmetry when creating a system of

[R] Background colour of axis

2009-07-21 Thread Miguel Lacerda
Hi, I would like to be able to shade the background of part of an axis. To illustrate, consider the following code: par(xaxt=n) x=1:10 y=rnorm(10,0,1) plot(x,y,type=l,xlab=NA) mtext(text=LETTERS[1:10], side=1, at=1:10) How can I make the background behind, say, G H I on the x-axis red? I have

[R] Split plot analysis problems

2009-07-21 Thread Jean-Paul Maalouf
Hello, I would be very grateful if someone could give me a hand with my split plot design problems. So here is my design : I am studying the crossed-effects of water (wet/dry) and mowing (mowed/not-mowed = nm) on plant height (PH) within 2 types of plant communities (Xerobromion and

Re: [R] WISP-survey part of created area?

2009-07-21 Thread Eric R.
Anja: Unfortunately, WiSP does not offer a spatially-explicit way to specify capture probabilities for the designated study region. Although the members of the population are assigned spatial coordinates within the study region, there is no specification of where the 'captures' take place

Re: [R] randomForest - what is a 'good' pseudo r-squared?

2009-07-21 Thread Liaw, Andy
Generally speaking, the pseudo R^2 of 70% is a rather good model (obviously depends on the kind of data you have at hand). Because it's pseudo, not real, R^2, so the range is not limited to [0, 100%], but it's hard for me to imagine anyone getting 100%. You may want to check the distribution of

[R] Subsample points for mclust

2009-07-21 Thread Mario Valle
Hi all! I have an ordered vector of values. The distribution of these values can be modeled by a sum of Gaussians. So I'm using the package 'mclust' to get the Gaussians's parameters for this 1D distribution. It works very well, but, for input sizes above 100.000 values it starts taking

Re: [R] package quantreg behaviour in weights in function rq,

2009-07-21 Thread roger koenker
Václav, I think that the technical term for this is snafu. You are right of course that the magnitude of the weights should have no impact on the fitted values. The good news is that the coefficient estimates satisfy this obvious principle, but unfortunately the fitted.values component is

Re: [R] how to change the quantile method in bwplot

2009-07-21 Thread Deepayan Sarkar
On Tue, Jul 21, 2009 at 7:47 AM, Jun Shenjun.shen...@gmail.com wrote: Uwe, Thank you for your reply.  I am still not very clear about the meanings of the arguments in the stats function.   To make it clearer, quantile() uses type=7 as default method. I believe this is the method bwplot() uses

[R] Select value according two vectors...

2009-07-21 Thread MarcioRibeiro
Hi listers, I have a problem in identifying a value between two vectors... Suppose vector A is... 0. 0.0909 0.0909 0.1818 0.2727 0.3636 0.4545 0.6363 0. 0. 0. 0. And vector B is... 3 5 7 18 43 85 91 98 100 130 230 487 I would like to identify the value of vector B

Re: [R] Select value according two vectors...

2009-07-21 Thread Dieter Menne
MarcioRibeiro wrote: I have a problem in identifying a value between two vectors... Suppose vector A is... 0. 0.0909 0.0909 0.1818 0.2727 0.3636 0.4545 0.6363 0. 0. 0. 0. And vector B is... 3 5 7 18 43 85 91 98 100 130 230 487 I would like to identify the

Re: [R] Select value according two vectors...

2009-07-21 Thread Steve Lianoglou
On Jul 21, 2009, at 11:28 AM, Dieter Menne wrote: MarcioRibeiro wrote: I have a problem in identifying a value between two vectors... Suppose vector A is... 0. 0.0909 0.0909 0.1818 0.2727 0.3636 0.4545 0.6363 0. 0. 0. 0. And vector B is... 3 5 7 18 43 85 91 98

Re: [R] Select value according two vectors...

2009-07-21 Thread David Winsemius
On Jul 21, 2009, at 11:11 AM, MarcioRibeiro wrote: Hi listers, I have a problem in identifying a value between two vectors... Suppose vector A is... 0. 0.0909 0.0909 0.1818 0.2727 0.3636 0.4545 0.6363 0. 0. 0. 0. And vector B is... 3 5 7 18 43 85 91 98 100 130

Re: [R] Show representation of a data structure

2009-07-21 Thread Greg Snow
You are probably thinking of the str function. But also look at the TkListView function in the TeachingDemos package for visualizing lists of lists and complex objects. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org

Re: [R] heatmap plot

2009-07-21 Thread Michael Knudsen
2009/7/21 Markus Mühlbacher muehli...@yahoo.com: I tried to add white to the colors, but this did not change my problem. Still the values of the diagonal seem to be different from those occurring in the matrix. Or in other words all squares of the diagonal should have to SAME color! If

[R] suggestions for JSM 2010 invited sessions

2009-07-21 Thread Thomas Lumley
It's planning time for the 2010 Joint Statistical Meetings in Vancouver. I am the Program Committee representative for the Section on Statistical Computing, so I'm looking for suggestions for invited sessions. Detailed proposals are welcome, as are vague suggestions for topics and speakers

[R] strange dlply behavior

2009-07-21 Thread Damien Moore
I'm running R 2.9.1 on winXP, using the library plyr. Can anyone explain to me what is going wrong in this code? (in particular see lines marked with **) Trying to modify objects in a list created using dlply seems to corrupt the objects in the list. library(plyr)

[R] Is arima forecast

2009-07-21 Thread Matteo Bertini
Using the gretl.sf.net dialect: Static forecasts are one step ahead, based on realized values from the previous period, while dynamic forecasts employ the chain rule of forecasting. What kind of forecast is doing forecast.Arima? Thanks, Matteo Bertini

Re: [R] animated grid graphics

2009-07-21 Thread Greg Snow
Imagemagick and gimp work on windows, linux, and mac as well and have tools for creating animated gifs (and possibly other animation files). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From:

[R] list of lm() results

2009-07-21 Thread Idgarad
How can I get the results of lm() into a list so I can loop through the results? e.g. myResults[1] - lm(...) myResults[2] - lm(...) myResults[3] - lm(...) ... myResults[15] - lm(...) myResults[16] - lm(...) so far every attempt I've tried doesn't work throwing a number of items to replace is

[R] Calling R functions from multiple threads

2009-07-21 Thread David Haykazyan
Hi, I am embedding R into a C++ application. Is it possible to call R functions from different threads? If yes, should I call Rf_initEmbeddedR once or for each thread separately? I know that R is not thread safe and making sure that no simultaneous calls from different threads happen. Now I am

Re: [R] Background colour of axis

2009-07-21 Thread Greg Snow
Look at the xpd argument to the par function. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Miguel Lacerda

Re: [R] how to change the quantile method in bwplot

2009-07-21 Thread Matthias Kohl
for teaching purposes I wrote a corresponding function; cf. qbxp.stats (as well as qboxplot ...) in package MKmisc. hth, Matthias Deepayan Sarkar schrieb: On Tue, Jul 21, 2009 at 7:47 AM, Jun Shenjun.shen...@gmail.com wrote: Uwe, Thank you for your reply. I am still not very clear about

Re: [R] list of lm() results

2009-07-21 Thread S Ellison
You could look at ?lmList in package lme ... Idgarad idga...@gmail.com 21/07/2009 17:27:52 How can I get the results of lm() into a list so I can loop through the results? e.g. myResults[1] - lm(...) myResults[2] - lm(...) myResults[3] - lm(...) ... myResults[15] - lm(...) myResults[16] -

[R] subscript into matrix discards row/column names

2009-07-21 Thread Vadim Ogranovich
Dear R-help, When the result of a matrix subscription degenerates to a scalar the names implied by the dimnames are discarded. x - matrix(0, 1, 1, dimnames=list('a', 'x')) ## below I expected result to have names='x', it's not x[1,] [1] 0 ## below I expected result to have names='a', it's

Re: [R] list of lm() results

2009-07-21 Thread David Winsemius
On Jul 21, 2009, at 12:27 PM, Idgarad wrote: How can I get the results of lm() into a list so I can loop through the results? e.g. myResults[1] - lm(...) myResults[2] - lm(...) myResults[3] - lm(...) ... myResults[15] - lm(...) myResults[16] - lm(...) so far every attempt I've tried

  1   2   >