Re: [R] Negative Binomial Regression

2008-07-29 Thread Ben Bolker
hink you can *quite* get negative binomial regression this way, but you can definitely get a quasipoisson model. I think exchangeable correlation corresponds to correlation=corCompSymm() in your glmmPQL command. Ben Bolker __ R-help@r-project.org mailing l

Re: [R] Negative Binomial Regression

2008-07-29 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prof Brian Ripley wrote: | On Tue, 29 Jul 2008, Ben Bolker wrote: | |> jcarmichael gmail.com> writes: |> |>> |>> |>> Hello. |>> |>> I am attempting to duplicate a negative binomial regression in R. |>>

Re: [R] Negative Binomial Regression

2008-07-29 Thread Ben Bolker
Prof Brian Ripley wrote: 'poisson' _family_, I presume? oops, yes. __ R-help@r-project.org 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 commente

Re: [R] adding lines to multiple plot

2008-07-30 Thread Ben Bolker
hole thing with a for loop: for (i in 1:Nvariables) { hist(variables[[i]],prob=TRUE,main=paste("Histogram of",i),xlab=i) lines(density(variables[[i]]),lwd=2) } Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] adding lines to multiple plot

2008-07-30 Thread Ben Bolker
raphs), if you "melt" your data frame first with the command from the reshape package. Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/po

Re: [R] Sampling two exponentials

2008-07-30 Thread Ben Bolker
ariate > Exponential" thing corresponding to the multivariate normal? Thanks in > advance. > It's not at all easy, but I'd suggest that you do some reading about copulas (and take a look at the copula package). Ben Bolker __

Re: [R] Sampling two exponentials

2008-07-31 Thread Ben Bolker
ook in, if this is an important part of your problem. ~ Ben Bolker -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIkbjvc5UpGjwzenMRAuIDAJ9sECxDVr0PUSxxv+36ZUKB+l2gvgCeJdzn vh9GmLhJTvlXZ30qqk8vn00= =eB7r -EN

Re: [R] Converting to subscripts and superscripts

2008-07-31 Thread Ben Bolker
place in your work sheet, replacing 2 with (superscript)2, and so on [it doesn't look like Excel's search-and-replace has a regular expression facility, but if you only have a few worksheets and a limited number of sub- and superscripts (say sub

Re: [R] Confidence intervals with nls()

2008-08-02 Thread Ben Bolker
My best guess is that the code you were copying was from an objective (fitted) function that computed the gradient itself, so the "predict" result had a "gradient" attribute. Here's an alternative that (I think) works OK, but it comes with the usual warranty (none). ## simulate "data" O.age =

Re: [R] Determining model parameters

2008-08-03 Thread Ben Bolker
charter.net> writes: > If I have some data that based on the historgram and other plots it "looks" like a beta distribution. Is there > a function or functions within R to help me determine the model parameters for such a distirbution? library(MASS) ?fitdistr _

Re: [R] Determining model parameters

2008-08-03 Thread Ben Bolker
~ The beta distribution only applies to data that are bounded between 0 and 1 (in some cases strictly bounded, i.e. 0 wrote: |> charter.net> writes: |> |>> If I have some data that based on the historgram and other plots it "looks" |> like a beta distribution. Is there |>> a function or functi

Re: [R] Confidence interval for the coefficient of variation

2008-08-05 Thread Ben Bolker
imulation do not > agree. > You probably need to contact the package author. Ben Bolker __ R-help@r-project.org 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] About colours in violin and simple violin plots

2008-08-06 Thread Ben Bolker
Fernando Marmolejo Ramos adelaide.edu.au> writes: > > Dear R users > > Let’s assume I have the following batches of data > > a <- rnorm(20,200,100) > b <- rnorm(20,250,100) > c <- rnorm(20,300,100) > > # I plot them as violin plots > require(vioplot) > vioplot(a, b, c) > > # I plot them as s

Re: [R] Determining model parameters

2008-08-08 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: | I am trying to fit a set of data to a Weibull distribution. Because the implementation requires that I put the data in the range of 0 < x < 1 I have a "normailze" function: | | normalize <- function(x) { | y <- (x-min(

Re: [R] Differential Equations there use in R (population modeling)

2008-08-11 Thread Ben Bolker
;m not sure what you mean by "do this with a change in time", but in general for ODEs you should check out lsoda in the odesolve package. You can also look at the ecology/environment task view. Ben Bolker __ R-help@r-project.org mailing list

Re: [R] detect if data is normal or skewed (without a boxplot)

2008-08-11 Thread Ben Bolker
ot a good idea. It's often hard to detect non-normality, and "fail to reject" shouldn't mean "accept". If you're concerned about non-normality, you should probably just use the Wilcoxon test all the time (it has about 95% of the power of the t-test i

Re: [R] Differential Equations there use in R (population modeling)

2008-08-11 Thread Ben Bolker
| evaluate the function at the present time step. | | On Mon, Aug 11, 2008 at 9:43 AM, Ben Bolker <[EMAIL PROTECTED]> wrote: |> stephen sefick gmail.com> writes: |> |>> e1 <- function(x,b,t){ |>> d<-(x)*(b^t) |>> plot(d) |>> } |>> |>>

Re: [R] Differential Equations there use in R (population modeling)

2008-08-11 Thread Ben Bolker
c(b=0.9)) plot(L1[,1],L1[,2]) stephen sefick wrote: error in isoda(y = 1, times = seq(0, 1, by = 0.02), func = e1B, parms = c(b = 0.9)) : Model function must return a list this is the error message I get when I try and paste in the code. Stephen Sefick On Mon, Aug 11, 2008 at 1:36 PM, Ben Bol

Re: [R] how can I do this sum?

2008-08-11 Thread Ben Bolker
dott gmail.com> writes: > > > Matlab has .*, so that > t(x1,x2).*t(x3,x4).* t(x5,x6) > > but what is .* in R? > > Thanks. > Dot. > Element-wise multiplication is just * in R (do you really mean "sum" or is that a general expression for "calculation"?) See also http://wiki.r-projec

[R] tkentry that exits after RETURN?

2008-08-11 Thread Ben Bolker
t <- tkentry(tt,show="*",textvariable=pass) ok <- tkbutton(tt,text="OK",default="active", command=function()tkdestroy(tt)) tkpack(label.widget, password.widget,ok) tkwait.window(tt) return(tclvalue(pass))

Re: [R] produce variable on the fly

2008-08-12 Thread Ben Bolker
var_names for the answer ("assign") and some reasons why it might be better to use lists instead. Ben Bolker __ R-help@r-project.org 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] Finishing details of dotplot

2008-08-12 Thread Ben Bolker
John Poulsen zoo.ufl.edu> writes: > > Hello, > > I am trying to create a dotplot, and have run into a couple of snags > with the finishing details. The below code creates the dotplot, but I > cannot figure out how to: 1) change the color of the CI bars to black, > not blue, 2) delete the

Re: [R] rgl/compiz problem

2008-08-13 Thread Ben Bolker
as been mentioned and discussed here and in other lists before, > and the solution is to turn off Ubuntu's fancy graphics. Back in > March, Ben Bolker said: > > """ > unfortunately rgl and compiz/etc. both try to use > the same OpenGL interface, so you can

Re: [R] rgl/compiz problem

2008-08-13 Thread Ben Bolker
Barry Rowlingson wrote: 2008/8/13 Ben Bolker <[EMAIL PROTECTED]>: Barry Rowlingson lancaster.ac.uk> writes: oe So he tried mouse buttons in combination. Holding B1 and then B3 and moving the mouse resulted in a zoom operation. Holding first B3 and then B1 resulted in rotation func

Re: [R] which alternative tests instead of AIC/BIC for choosing models

2008-08-13 Thread Ben Bolker
so big, is that you have a huge data set. Lindsey (p. 15) talks a bit about calibration that changes with the size of the data set. Model 3 will very probably give you better predictive power than model 2. If you want to select on the basis of improvement in R^2, why not just do that? B

Re: [R] rgl/compiz problem

2008-08-14 Thread Ben Bolker
Barry Rowlingson lancaster.ac.uk> writes: > > 2008/8/14 Marc Schwartz comcast.net>: > > >> I think it's an Ubuntu bug, because nothing like it occurs anywhere else. > >> So I'd suggest you turn off compiz or switch to a reliable OS like Windows > >> . > > > > Gack... > > [I'm not sure

Re: [R] x-axis with month and year

2008-08-15 Thread Ben Bolker
Schreiber, Stefan ales.ualberta.ca> writes: > > Hey list! > > I have a csv-file with two variables: (Date,CMI) > > Date,CMI > Jan-93,3.24 > Feb-93,-2.56 > . > . > . > Dec-06, 8.25 > > When I want to plot this dataset, R is sorting the date in alphabetical > order. Is there any way to te

Re: [R] Pdf file size for very scatter plots

2008-08-15 Thread Ben Bolker
en, on which every distinct point seems to be visible. I suppose you could try to thin the data set by figuring out which points are exactly on top of each other at a given resolution (by rounding, pasting columns together and looking for duplicates, or perhaps by using hexbin at a ridiculously h

Re: [R] how to override/replace a function in a package namespace?

2008-08-17 Thread Ben Bolker
stered as an S3 method if one is found. So if strucplot is exported from the vcd namespace (which I guess it is), this won't work. When I ran into a similar situation recently I couldn't find any solution other than rebuilding the package with my changes. Ben Bolker __

Re: [R] lmer and scale parameter in glmm model

2008-08-18 Thread Ben Bolker
Fränzi Korner oikostat.ch> writes: > Have you got an answer? I am now working with R 2.7.1.. This R-version does > not give the scale parameter in the summary of an lmer-object. > > Therefore, I would like to calculate the scale parameter by hand, but I did > not find out how. > One quick an

Re: [R] how to override/replace a function in a package namespace?

2008-08-18 Thread Ben Bolker
lace package version with hacked version ... unlockBinding("jags", RJ) assignInNamespace("jags",jags,ns="R2jags", envir=RJ) assign("jags", jags, envir=RJ) lockBinding("jags",RJ) rm(jags) ## get rid of global copy I'm beginning to feel it would

Re: [R] Line of best

2008-08-20 Thread Ben Bolker
Altaweel, Mark R. anl.gov> writes: > I have a scatter plot, with an equation that best fits the scatter plot expressed as: 1/x^.6. I know for > normal linear regression lines you can use the abline() command; however, since my best fit line is not > linear, how can I draw my line on the scatt

Re: [R] [help] simulation of a simple Marcov Stochastic process for population genetics

2008-08-21 Thread Ben Bolker
z3mao gmail.com> writes: > > > Hi, this is my first time using R. I want to simulate the following process: > "in a population of size N, there are i individuals bearing genotype A, the > number of those bearing A is j in the next generation, which following a > binominal distribution (choose j

Re: [R] Eliminating columns that sum to zero

2008-08-24 Thread Ben Bolker
the "R tips" section of the R wiki ( http://wiki.r-project.org ). cheers Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-

Re: [R] no output when run densityplot...

2008-08-26 Thread Ben Bolker
my machine the *densityplot* function produces > any output, I mean a blank graphic. I believe this is FAQ 7.22, "why do lattice graphics not work?" Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] r function for calculating extreme spread in group

2008-08-27 Thread Ben Bolker
group > > ex.spread = max{ sqrt [ (xi-xj)^2 - (yi-yj)^2 ] } for i not equal to j > > I have 60 levels to apply this to. > how about something like max(dist(cbind(x,y)) ... ??? (or to do this in a data frame d with columns x, y, and g (group), sapply(split(d,d$g),function(

Re: [R] Newbie: Examples on functions callling a library etc.

2008-08-28 Thread Ben Bolker
to load the contributed package myfunction <- function() { ## function with no arguments foo()## assuming the function "foo" is in the package list(matrix(nrow=2,ncol=2),matrix(nrow=3,ncol=3),matrix(nrow=4,ncol=4) } But I suspec

Re: [R] How to write the log function in R

2008-09-02 Thread Ben Bolker
o find the parameters > by MLE method. > if you have a vector y_k then diff(y_k) should give you a vector corresponding to (y_k - y_k-1) [I assume you mean y_{k-1} rather than {y_k}-1 above!] log(x!) is lfactorial(x) in R sum() works as expected the rest sho

Re: [R] question about GLM

2008-09-02 Thread Ben Bolker
glm carefully to determine whether you are predicting responses on the linear predictor (=log-odds) scale or the original scale Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

Re: [R] (sans objet)

2009-08-10 Thread Ben Bolker
something like table(cut(M$GWP_Max,breaks=c(0,1000,3000,1))) Inchallah Yarab wrote: > > i have written this in R, > > >> data1 <- read.csv2("c:/Total1.csv",sep=",") >> data2 <- read.csv2("c:/GWPMax1.csv",sep=",") >> M <- merge(data1, data2, by.x = "Policy.Number", by.y = "Policy.Numbe

Re: [R] Need Advice: Considering Converting a Package from S3 to S4

2009-08-10 Thread Ben Bolker
difficult to deal with debugging, etc. -- I can never remember the precise incantation to find out which methods are available and how to trace() them. (And documenting them is harder too -- it's much easier to not-really-document S4 classes in a package and get away with it.) Ben Bolker

Re: [R] Need Advice: Considering Converting a Package from S3 to S4

2009-08-11 Thread Ben Bolker
I can see that fortune("S4") is going to produce more than one possible response soon ... (is Achim Zeleis listening?) Ben Frank E Harrell Jr wrote: > > spencerg wrote: >> Hi, Terry: >> >> Thanks for the comments. I too vastly prefer S3 to S4. Your > > Me too. My summary is t

[R] ggplot2: override facet names in facet_wrap?

2009-08-11 Thread Ben Bolker
e levels of the factor, but it would be convenient to be able to supply a vector of level names at the time of plotting ... cheers Ben Bolker signature.asc Description: OpenPGP digital signature __ R-help@r-project.org mailing list https://stat.

Re: [R] ggplot2: override facet names in facet_wrap?

2009-08-11 Thread Ben Bolker
nd examples of label_value and label_both. > They should suggest how to write your own labeller to do what you > want. > > Hadey > > On Tue, Aug 11, 2009 at 1:44 PM, Ben Bolker wrote: >> >>  just a quick question (to which I suspect the answer is "no")

Re: [R] Help for R (Advanced matrix addition (large or undefined number of matrices)

2009-08-12 Thread Ben Bolker
Rusyte, Lina wrote: > > Dear Sirs, > > I would like to ask you, what function can I use for matrices addition? > I couldn't find any information about it in the manual or in the > internet. > (A+B suits, when the number of matrixes is small, function sum() doesn't > suit for matrices addition

Re: [R] how to get R interpreter to remember constant values without using any memory location

2009-08-13 Thread Ben Bolker
ot;factor" class in R is designed to do -- maintain a list of unique names corresponding to integer codes, and handle them (almost) transparently. (There are a few tricky aspects to dealing safely/correctly with factor conversions: see http://wiki.r-project.org/rwiki/doku.php?id=tips:data-factors:facto

Re: [R] how to get R interpreter to remember constant values without using any memory location

2009-08-13 Thread Ben Bolker
ot;factor" class in R is designed to do -- maintain a list of unique names corresponding to integer codes, and handle them (almost) transparently. (There are a few tricky aspects to dealing safely/correctly with factor conversions: see http://wiki.r-project.org/rwiki/doku.php?id=tips:data-factors:facto

Re: [R] how to get R interpreter to remember constant values without using any memory location

2009-08-13 Thread Ben Bolker
ot;factor" class in R is designed to do -- maintain a list of unique names corresponding to integer codes, and handle them (almost) transparently. (There are a few tricky aspects to dealing safely/correctly with factor conversions: see http://wiki.r-project.org/rwiki/doku.php?id=tips:data-factors:facto

Re: [R] how to get R interpreter to remember constant values without using any memory location

2009-08-13 Thread Ben Bolker
ot;factor" class in R is designed to do -- maintain a list of unique names corresponding to integer codes, and handle them (almost) transparently. (There are a few tricky aspects to dealing safely/correctly with factor conversions: see http://wiki.r-project.org/rwiki/doku.php?id=tips:data-factors:facto

[R] tick.number in ggplot2?

2009-08-13 Thread Ben Bolker
plots (corresponding to 6-cylinder engines) have scrunched/overlapping x axis labels. I guess turning the x axis labels vertically would be another solution, but I'd rather just make the ticks sparser if there were a way to do that ... cheers Ben Bolker -- Ben Bolker Associate prof

Re: [R] Can a variable name include '_' or '.' in portable R code

2009-08-16 Thread Ben Bolker
I think you're misinterpreting the context, although it is admittedly a confusing context. I think that what is meant by this that you should NOT use accented symbols (or other symbols such as ß), which could be considered "alphanumeric". The rest of the sentence in which this note occurs expl

Re: [R] Question regarding finding credible interval using r2winbugs

2009-08-16 Thread Ben Bolker
coda::HPDinterval(fit,prob=0.9) SATRAJIT ROYCHOUDHURY-2 wrote: > > Dear > > I am trying to find a 90% credible interval. I am using the following > code. >fit<-bugs( >model.file=BUGScode, >data=data, >inits = list(geninits1,geninits2), >parameters.to.save=keepers, >n

Re: [R] Installing quantreg package under Ubuntu

2009-08-18 Thread Ben Bolker
Frank E Harrell Jr wrote: > > Does any have installation instructions for this? When I run > install.packages('quantreg') I get: > > gcc -std=gnu99 -shared -o quantreg.so akj.o boot.o brute.o chlfct.o > cholesky.o combos.o crq.o crqfnb.o dsel05.o etime.o extract.o idmin.o > iswap.o kuantil

Re: [R] how to Transpose a dataset

2009-08-18 Thread Ben Bolker
rajclinasia wrote: > > Hi everyone, > > How to a transpose a R dataset with a specified variable. If possible send > the code. it will be very helpful for us. > Not clear what "with a specified variable" means. t(x) will only work with matrices; if you have read in an (all-numeric) dataset

Re: [R] Question regarding finding credible interval using r2winbugs

2009-08-18 Thread Ben Bolker
erval" > > Can you pls tell me what is the way around of this error? > > Thanks in advance, > > Best regards, > > Satrajit > > On Sun, Aug 16, 2009 at 9:55 PM, SATRAJIT ROYCHOUDHURY > mailto:satri...@gmail.com>> wrote: > Thanks a lot! > >

Re: [R] ggplot2 and mtext question

2009-08-23 Thread Ben Bolker
Data Analytics Corp. wrote: > > Hi, > > In R base graphics, the function mtext can be used to add text to the > margins of a plot. This is very useful for adding notes (such as data > source, sample size, etc.) to the bottom of a graph. How can such notes > be added to the bottom of a gra

Re: [R] Surpress one panel in lattice plot..?

2009-08-23 Thread Ben Bolker
assign the factor interaction explicitly to a variable (mydata$interact = with(mydata,interaction(f1,f2)) or f1:f2) and group by the interaction (which will be missing the empty group) rather than by the two groups Ben Bolker -- View this message in context: http://www.nabble.com/Surpress-one-p

Re: [R] transforming data glm

2009-08-24 Thread Ben Bolker
Mcdonald, Grant wrote: > > Dear sir, > > I am fitting a glm with default identity link: > > > > model<-glm(timetoacceptsecs~maleage*maletub*relweight*malemobtrue*femmobtrue) > > the model is overdisperesed and plot model shows a low level of linearity > of the residuals. > > >> I don't

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-24 Thread Ben Bolker
My two cents: this is a hard problem to do, period (not just in R). I would second the recommendation of the Dormann et al paper listed below; also see Zuur, Alain F., Elena N. Ieno, Neil J. Walker, Anatoly A. Saveliev, and Graham M. Smith. Mixed Effects Models and Extensions in Ecology with R. 1s

Re: [R] GLMs

2009-08-26 Thread Ben Bolker
Letizia Campioni wrote: > > > Hi, > > I am starting to work with R. > > I need to performe a General linear model and a Generalized mixed model, > what are the package I have to use for? > > what is the difference between them? > > General linear models (called GLM mostly by SAS users)

Re: [R] contourLines() documentation

2009-08-26 Thread Ben Bolker
anguage_. Wadsworth & Brooks/Cole. is that, or just referencing R, good enough? I don't have access to a copy of this book at the moment, so can't tell you what it says about the contour algorithm used (and Google Books doesn't have a preview for this book). Ben Bolk

Re: [R] tweedie and lmer

2009-08-26 Thread Ben Bolker
lies with "extra" parameters, such as negative binomial, beta-binomial, tweedie etc.). Perhaps you were reading about lme? Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] tweedie and lmer

2009-08-27 Thread Ben Bolker
kbs wrote: > > This is the link that gave me the indication: > > https://stat.ethz.ch/pipermail/r-help/2007-March/127261.html > > Are there alternative ways to deal with a high count of zeros for > count data with lmer? > Fair enough. I think the problem is that lme4 has changed quite

Re: [R] R functions that count lines of a files

2009-09-01 Thread Ben Bolker
length(count.fields("foo.txt")) ? xue dong wrote: > > hi, everyone, > > do you know if there is a R function that can count the lines of a file > without open it? > > something like "wc -l " in Unix. > > Thanks, > > Xue > > [[alternative HTML version deleted]] > > _

Re: [R] interactions and stall or memory shortage

2009-09-01 Thread Ben Bolker
The short answer is that you're trying to make a categorical interaction out of continuous variables, so that the resulting factors i2 and i3 have 1050 and 7200 levels respectively. (Note to people trying to reproduce this example: you'll need library(emdbook); library(bbmle); data(Lily_sum) .

Re: [R] GLM contrasting question

2009-09-01 Thread Ben Bolker
sodiumfish wrote: > > I have run a glm with a final formula of : (dependent variable = parasite > load, main effects are sex, month, length and weight, with sex:month and > length:weight first order interactions). > > I am using the summary(mod) command to give me the contrasts, which I > beli

Re: [R] "simple" 3-dimensional plots?

2009-09-02 Thread Ben Bolker
I think install.packages("akima") library(akima) example(interp) would be most useful. -- View this message in context: http://www.nabble.com/%22simple%22-3-dimensional-plots--tp25247706p25262822.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] variable selection in logistic

2009-09-02 Thread Ben Bolker
David Winsemius wrote: > > > On Sep 2, 2009, at 9:36 PM, annie Zhang wrote: > >> Hi, R users, >> >> What may be the best function in R to do variable selection in >> logistic >> regression? > > PhD theses, and books by famous statisticians have been pursuing the > answer to that question

Re: [R] Re cursion is slow

2009-09-03 Thread Ben Bolker
Bryan Keller wrote: > > The following recursion is about 120 times faster in C#. I know R is not > known for its speed with recursions but I'm wondering if anyone has a tip > about how to speed things up in R. > > #"T" is a vector and "m" is a number between 1 and sum(T) > > A <- function(T,

Re: [R] Best Way to Compute/Approximate(?) Probabilty of a Point in a Given Distribution

2009-09-04 Thread Ben Bolker
Gundala Viswanath wrote: > > AFAIK, R only has "pnorm" which computes the probability of getting a > value smaller or equal to "x" from > a normal distribution N[mean,stdev]. For example: > > R> pnorm(0, 4, 10) > [1] 0.3446 > > means there is 34.46% chance of getting a value equal to or smal

Re: [R] model simulation

2009-09-07 Thread Ben Bolker
Rafael Moral yahoo.com.br> writes: > > Dear useRs, > > Is there a package or a function able to simulate models with sets of differential equations? > Where we could input our model and give R some value to start with and it would generate the graphs? > > Regards, > Rafael. > install.packag

Re: [R] Omnibus test for main effects in the face ofaninteraction containing the main effects.

2009-09-07 Thread Ben Bolker
John Sorkin wrote: > > Daniel, > When Group is entered as a factor, and the factor has two levels, the > ANOVA table gives a p value for each level of the factor. What I am > looking for is the omnibus p value for the factor, i.e. the test that > the factor (with all its levels) improves the pr

Re: [R] Data separated by spaces, getting data into R using field lengths

2009-09-08 Thread Ben Bolker
I don't think you described your problem precisely. You implied that you wanted the field lengths to be (2,2,18,5,18) -- which is what you got with read.fwf -- but it looks like what you meant is something more like: field 1: first two characters field 2: characters 3-4 field 3: all alphabeti

Re: [R] optim() argument scoping: passing parameter values into user's subfunction

2009-09-08 Thread Ben Bolker
Szumiloski, John wrote: > > Dear useRs, > > I have a complicated function to be optimized with optim(), and whose > parameters are passed to another function within its evaluation. This > function allows for the parameters to enter as arguments to various > probability distribution functions.

Re: [R] Confident interval for nls predictions

2009-09-08 Thread Ben Bolker
Ben Ridenhour wrote: > > Hello all, > I'm trying to establish some confidence intervals on predictions I am > making using > >>predict(nls(...)) > > and predict.nls (unfortunately) does not utilize the se.fit option. A > little more background is that I am trying to match the output with old

Re: [R] Negative AIC

2009-09-10 Thread Ben Bolker
Corrado-5 wrote: > > Dear R list, > > I just obtained a negative AIC for two models (-221.7E+4 > and -230.2E+4). Is that normal? > > It's not necessarily wrong. See -- View this message in context: http://www.nabble.com/Negative-AIC-tp25383791p25384865

Re: [R] Negative AIC

2009-09-10 Thread Ben Bolker
something was wrong, if you have some AIC values that are on the order of -20,000 (as below) and others that are +20,000 ... Ben Bolker Corrado wrote: > My worry is: can I compare negative AIC with positive AIC? does the > comparison > still hold? > > On Thursday 10 September 20

Re: [R] error: could not find function "sd"

2009-09-16 Thread Ben Bolker
sselamat wrote: > > Hi, > Everytime I try to get the standard deviation of a vector and enter > command of sd(x), i get a reply > Error: could not find function "sd" > Can someone help me please? > Thanks. > > Hmmm. Please provide more information, it's hard to imagine how this could happ

Re: [R] How to colour the tip labels in a phylogenetic tree

2009-09-17 Thread Ben Bolker
Graham Etherington wrote: > > Hi, > Using Ape, I have constructed an object of class "phylo", using the > method 'nj' (lets call the object 'tree_ja'). > I also have a given subset of 'tree_ja' in a vector (lets call the > vector 'subspecies'). > What I want to do, is construct a nj tree - pl

Re: [R] How to separate a function by 2 probabilities

2009-09-17 Thread Ben Bolker
Marcio Resende wrote: > > Good Mourning, > I have a function to generate a matrix as I show part of it; > > g[j,i]<-if (gen[j,i]==0) al1[i,1]+al1[i,1] else ... > > However i would like that this function occurred with a probability P and > that another function (another formula to generate g

Re: [R] statistics

2009-09-20 Thread Ben Bolker
not for homework problems. This looks like a homework problem. sincerely Ben Bolker -- View this message in context: http://www.nabble.com/statistics-tp25530074p25530076.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-

Re: [R] spplot and cex

2009-09-21 Thread Ben Bolker
Roberto Brunelli gmail.com> writes: > > Dear community, > > I'm using R 2.6.1 on a GNU/Linux Slackware box. I would like to obtain > larger text when using spplot (from sp 0.9-43) using > > spplot(... cex=2) > > but I get no visible effect. > > Any help? > We need a reproducible example/

Re: [R] Function similar to cumsum/cumprod

2009-09-22 Thread Ben Bolker
Sergey Goriatchev gmail.com> writes: > > Hello, everyone > > I wonder if there is in R somewhere a function similar to cumsum(). > The function calculates a statistic (say mean or standard deviation) > buy adding consequtively one more data point. > > So, say I have a timeseries of 100 observa

Re: [R] Question about zero-inflated poisson with REML.

2009-09-22 Thread Ben Bolker
Sunghee Kim gmail.com> writes: > > Dear All, > > As you know, glmmADMB package use ML method for estimation. > Is it possible to use REML estimation method for zero-inflated Poisson > distribution? > > For ML method, > poi_ML <- glmm.admb(los ~ psihigh + trt.mod + trt.high + psihigh*trt.mod +

Re: [R] nlme w/no groups and spatially correlated residuals

2010-02-11 Thread Ben Bolker
hat you're looking for if you want non-linear least squares with correlation and/or heteroscedasticity but without random effects. Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] using mle2 for multinomial model optimization

2010-02-12 Thread Ben Bolker
Ravi Varadhan jhmi.edu> writes: > > > Use "Nelder-Mead" as the method in optim. This will give you the correct solution. > > m1 <- mle2(mfun, start=svec, vecpar=TRUE, fixed=svec[1:(l-1)], > method="Nelder") > > Hope this is helpful, > Ravi. Well-meaning though it is, this solution doesn'

Re: [R] using mle2 for multinomial model optimization

2010-02-12 Thread Ben Bolker
Ravi Varadhan jhmi.edu> writes: > > > Use "Nelder-Mead" as the method in optim. This will give you the correct solution. > > m1 <- mle2(mfun, start=svec, vecpar=TRUE, fixed=svec[1:(l-1)], > method="Nelder") > > Hope this is helpful, > Ravi. > {Resending because it doesn't seem to have g

Re: [R] (no subject)

2010-02-13 Thread Ben Bolker
Hussain Abusaaq fsu.edu> writes: > I have this vector and I want to change it to date. > > for example G=[05 12 2008] > > or g=[2] > f=[3] > y=[2208] > Something like as.Date(paste(rev(G),collapse="-")) __ R-help@r-project.org mailing list

Re: [R] (no subject)

2010-02-13 Thread Ben Bolker
; >> as.Date("02 03 2008",format="%m/%d/%Y") > [1] NA > I hope you can help me here > - Original Message - > From: Ben Bolker > Date: Saturday, February 13, 2010 1:03 pm > Subject: Re: [R] (no subject) > To: r-h...@stat.math.ethz.ch >

Re: [R] Editing a function

2010-02-27 Thread Ben Bolker
learner1978 gmail.com> writes: > > > I am beginner to R. > > I have written a function: > > f= function(n=100,p=0.5){ > X=rbinom(100,n,p) > (mean(X)-n*P)/sqrt(n*p*(1-p)) > } > > But I made a mistake by typing "P" instead of "p". How do I edit this > function and improve my mistake. Two an

Re: [R] Bug in ecdf? Or what am I missing?

2010-02-28 Thread Ben Bolker
ords and xyz.coords) that don't know (internally) whether type="n" or not ... I don't know whether I would formally count this as a bug or not (a minor one, at most), but it would probably worth following up on R-devel if you feel strongly about it. Ben Bolker

Re: [R] factorial block design with missing data

2010-02-28 Thread Ben Bolker
if* you are dealing with a large number of missing values you might want to consider using the lme() function (in the nlme package), along with its companion book by Pinheiro and Bates (2000); the methods used in that package should be more robust to lack of balance than lm/aov ... Ben Bolk

Re: [R] Calling SAS from R

2010-02-28 Thread Ben Bolker
Yen Lee ntu.edu.tw> writes: > I apologize if my sentence is not fluent to read. > > I am doing a simulation study and I need to execute SAS and > read a SAS code in R. > I try the following code but it doesn't work. > system('"c:\\program files\\SAS\\SAS 9.1\\sas.exe" "c:\\syntax.sas"') > can

Re: [R] distribution for random effects?

2010-03-02 Thread Ben Bolker
Maureen Ryan ucdavis.edu> writes: > > Hi R users, > > I am using the following model to analyze data from a factorial experiment > (randomized complete block design with no replication within blocks): > > model <- glm(survival ~ density * vegetation + (1|block), data=sal2005, > family="binomia

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Ben Bolker
blue sky gmail.com> writes: I almost certainly shouldn't feed the trolls, but: 1. ?kruskal.test (listed in "see also" in ?wilcox.test) 2. One of the disadvantages of nonparametric tests is that it is in general difficult to generalize them to analogues of arbitrarily complex linear mixed mod

Re: [R] Computation of AIC for gls models

2010-03-09 Thread Ben Bolker
Miguel Angel Rodríguez-Gironés Arbolí eeza.csic.es> writes: > > Dear Colleagues, > > We are using the phylog.gls.fit() function from the R package > "PHYLOGR" (Diaz-Uriarte R, Garland T: > PHYLOGR: Functions for phylogenetically based statistical > analyses. 2007. [snip] > ... we would wa

Re: [R] Deltas or changes

2010-03-09 Thread Ben Bolker
Henrique Dallazuanna gmail.com> writes: > Reduce("/", as.data.frame(embed(x, 2))) > > ManInMoon googlemail.com> wrote: > > > > How can I generate a vector of differences between each > elemtn of an vector? (you mean ratios, right?) > > > > i.e. a[i]=x[i]/x[i-1] x[-1]/x[-length(x)] mig

Re: [R] using near-zero probabilities in optimization

2010-03-09 Thread Ben Bolker
Benedikt Gehr ieu.uzh.ch> writes: > > Hi there > > I am using mle2 for a multinomial likelihood optimization problem. My > function works fine when I'm using simulated data, however my cell > probabilities of the true data for the multinomial likelihood are > sometimes very small (in some ca

Re: [R] mcmc sampling and glmer

2010-03-13 Thread Ben Bolker
Marie-Agnes rennes.inra.fr> writes: > Trying to test for the effect of fixed factors in a generalized linear > mixed model, I face the problem of mcmc not yet implemented with such > models. > I would like to know if there is any equivalent procedure to that > applied on lme ( "lmer" followed

Re: [R] dmvnorm masked by emdbook

2010-03-14 Thread Ben Bolker
ous sigma parameter, although I don't know how much the additional complexity is worth it. I could also add a NAMESPACE to the package so that one could specify emdbook::curve3d so one could run curve3d without actually loading the package ... Ben Bolker (bolker AT ufl.edu) _

<    1   2   3   4   5   6   7   8   9   10   >