Re: [R] Independent variable dependent on offset in GLMM

2013-11-26 Thread Ben Bolker
Jonas Josefsson slu.se> writes: > > Hi! (I was initially going to say that this question would probably be better on r-sig-mixed-mod...@r-project.org, but now that I've been through it I've changed my mind -- there aren't really any issues here that are specific to mixed models ... it's real

Re: [R] Thoughts for faster indexing

2013-11-21 Thread Ben Bolker
Neal Fultz gmail.com> writes: > > Noah, > > If N is # of rows, k is # of unique IDs > > Using which() is O(N), using which() in a loop is going to be O(Nk); > > sorting the entire data is O(N ln N) and then you can process it in > contiguous blocks, no which required. > > -Neal > You mi

Re: [R] Inverse of Probit

2013-11-20 Thread Ben Bolker
David Winsemius comcast.net> writes: > > > On Nov 19, 2013, at 10:59 AM, Calum wrote: > > > Hi there, > > I hope someone can help me. > > > > I have a dataset of Concentration against Mortality, and I am trying to > > compare the use of Logit and Probit models using this data. [snip snip sn

Re: [R] Binomial GLM in Stata and R

2013-11-20 Thread Ben Bolker
Floor Biemans hotmail.com> writes: [snip] > The stata code I have is: > > glm c IndA fia, family(binomial s) link(cloglog) offset(offset) > > The R code is: > > glmt <- glm(data=dataset, c ~ IndA + fia, offset = offset, family = binomial(link = cloglog)) > > Which yields different results fr

Re: [R] nlme function summary.lmList cannot be found with new versions

2013-11-20 Thread Ben Bolker
megan herting chla.usc.edu> writes: > > Hello, > > I installed the newest version of R (3.0.2) as well as the > newest version of > nlme (3.1-113) in order to use summary.lmList and other > nlme functions. Once > loading the new library, lmList and summary.lm can be found, > but a number of

Re: [R] Repeated measures with categorical data

2013-11-19 Thread Ben Bolker
s probably considered 'ordinal', i.e. ordered categorical, which may be helpful terminology in searching for solutions.) Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

Re: [R] Getting residual term out of lmer summary table

2013-11-12 Thread Ben Bolker
wsl.ch> writes: > > Hello > I'm working with mixed effects models using lmer() and have some > problems to get all variance components of the model's random > effects. I can get the variance of the random effect out of the > summary and use it for further calculations, but not the variance >

Re: [R] problem with interaction in lmer even after creating an "interaction variable"

2013-11-08 Thread Ben Bolker
compare > explained variability. Is there some option, or it is simply impossible? > Thank you, Anna The development version of lme4 has an (experimental) feature that automatically removes collinear columns of the model matrix; you could try that. Further discussion on r-sig-mix

Re: [R] Error running MuMIn dredge function using glmer models

2013-11-07 Thread Ben Bolker
Martin Turcotte gmail.com> writes: > Dear list, > I am trying to use MuMIn to compare all possible mixed models > using the dredge function on binomial data but I > am getting an error message that I cannot decode. This error > only occurs when I use glmer. When I use an lmer > analysis on a d

Re: [R] Adding the complementary log-link to binomial() and make.link()

2013-11-07 Thread Ben Bolker
Ken Knoblauch inserm.fr> writes: > > Roland Deutsch tuwien.ac.at> writes: > > in my research I frequently work with binomial > response models, which > > are of course part of the generalized linear > models. While I do use > > common link functions such as the logit, probit > and cloglog,

Re: [R] problem with interaction in lmer even after creating an "interaction variable"

2013-11-07 Thread Ben Bolker
a_lampei uni-tuebingen.de> writes: > > Dear all, > I have a problem with interactions in lmer. I have 2 factors (garden and > gebiet) which interact, plus one other variable (home), > dataframe arr. When > I put: > / > lmer (biomass ~ home + garden:gebiet + ( 1|Block), data = arr)/ > > it wri

Re: [R] Error message glmer using R: “ 'what' must be a character string or a function”

2013-11-06 Thread Ben Bolker
both r-help and Stack Overflow tends to lead to duplicated effort/ frustration. Please choose one or the other (in my opinion it's OK to cross-post after a few days if you don't get any responses in one place, provided that you say that you've cross-posted and ideally provide a referenc

Re: [R] Comparison of two weibull distributions

2013-11-03 Thread Ben Bolker
kmmoon100 student.unimelb.edu.au> writes: > > Hello, > > How can I do a test of two weibull distributions? > I have two weibull distribution sets from two wind datasets in order to > check whether they are same. > I thought 2 sample t-test would be applicable but I couldn't find any ways > to d

Re: [R] Problems with lme random slope+intercept model

2013-10-27 Thread Ben Bolker
g) ... I would guess that your model is overfitted/unidentifiable, but I would have to look a lot more carefully to know for sure. Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

Re: [R] na.action within glmmADMB package?

2013-10-08 Thread Ben Bolker
Marta Lomas hotmail.com> writes: > > Hello everybody, > > I would like to know if within the glmmADMB package into R interface > there is a way to deal with the NAs > different than applying "dataformodeling= na.omit(dataframe)". > This way as you may know removes all > the rows of the data

Re: [R] Error: C stack usage is too close to the limit when using list.files()

2013-09-27 Thread Ben Bolker
Jonathan Greenberg illinois.edu> writes: > > R-helpers: > > I'm running a file search on my entire drive (Mac OS X) using: > > files_found <- list.files(dir="/",pattern=somepattern,recursive=TRUE,full.names=TRUE) > where somepattern is a search pattern (which I have confirmed via a > unix "fin

Re: [R] Is it possible with two random effects in lme()?

2013-09-26 Thread Ben Bolker
n > so I need use lme. > Bettina This (crossed random effects) is possible but not that easy: you should (1) study the later chapters of Pinheiro and Bates 2000 and (2) re-post this question to r-sig-mixed-mod...@r-project.org. good luck, Ben Bolker ___

Re: [R] Slight misinformation in OSX version of R

2013-09-25 Thread Ben Bolker
Erich Neuwirth univie.ac.at> writes: > > I just installed R on a Mac without any traces of earlier versions. > It exhibited a well know problem: > > WARNING: You're using a non-UTF8 locale, therefore only ASCII > characters will work. > Please read R for Mac OS X FAQ (see Help) section 9 and

Re: [R] Arcsine transformation

2013-09-22 Thread Ben Bolker
oi/full/10.1890/10-0340.1. I think the title is a little silly, but it's worth reading. > Peter Alspach > > -Original Message- From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Bolker Sent: > Monday, 23 September 2013 1

Re: [R] Arcsine transformation

2013-09-22 Thread Ben Bolker
peake osu.edu> writes: > > I am tryin to perform an arcsine transformation on my data containig > percentages as the dep. variable. Does anyone have a code that I could use > to do that? I am relatively new to R. Thanks for your help! asin(x/100) ? or asin(x/100)*2/pi if you want the results

Re: [R] glmer vs glmmadmb

2013-09-19 Thread Ben Bolker
1 0.075400.068191.11 0.2689 > time.f2:intrv.f1 0.021480.023950.90 0.3698 > time.f3:intrv.f1 -0.048350.02394 -2.02 0.0435 * Otherwise I'm stumped. The numbers of observations etc. etc. seem consistent. It's hard to compare

Re: [R] lme4: How to specify nested factors, meaning of : and %in%

2013-09-17 Thread Ben Bolker
Shouli Li utu.fi> writes: > > I have the same problem. I am wondering have you solved the problem already? > > [[alternative HTML version deleted]] > > It's completely unclear from this message what the context is, so it's unanswerable -- sorry. (Perhaps there was a link to the ori

Re: [R] Subtracting elements of a vector from each other stepwise

2013-09-12 Thread Ben Bolker
t; Ben > > Perfectly reasonable request, and should be done where possible, but also note that sometimes I feel like I have time to toss in a quick answer but not to give much in the way of explanation, and I think something is better than nothing ... (and hope that perhaps someone els

Re: [R] superpose violin and boxplot in ggplot

2013-09-11 Thread Ben Bolker
PIKAL Petr precheza.cz> writes: > > Dear all > > I am struggling a bit with tricky violinplot. I found how to superpose boxplots correctly to violinplots. > > p<-ggplot(Cars93, aes(x=Origin, y=Price, fill=Type, colour=Type)) [snip] > > How I could change colour of boxplots to single colour

Re: [R] Subtracting elements of a vector from each other stepwise

2013-09-10 Thread Ben Bolker
arun yahoo.com> writes: > > Hi, > Not sure this is what you wanted: > >  sapply(seq_along(x), function(i) {x1<- x[i]; x2<- x[-i]; x3<-x2[which.min(abs(x1-x2))];c(x1,x3)}) > # [,1] [,2] [,3] [,4] > #[1,]   17   19   23   29 > #[2,]   19   17   19   23 > A.K. It's a little inefficient (be

Re: [R] Subtracting elements of a vector from each other stepwise

2013-09-10 Thread Ben Bolker
st(x)==min(dist(x))) > #[1] 1 > A.K. Yes, but you need to set the diagonal to NA, or something -- the OP doesn't want to include self-comparison. It also helps to use arr.ind=TRUE in which(). You're right that dist() would be a hair more efficient that outer(...), though >

Re: [R] Should I wrap more package examples in \dontrun{} ?

2013-09-03 Thread Ben Bolker
Hadley Wickham gmail.com> writes: > > >> It was my understanding that package authors are responsible for not > >> breaking other CRAN packages without warning. For example, before I > >> release a new version of plyr or ggplot2, I run R CMD check on every > >> package that depends on my packag

Re: [R] Contributing to R

2013-09-03 Thread Ben Bolker
Aleksey Vorona gmail.com> writes: > > Hi all, > > Could anyone describe what is the proper way to contribute to R? So > far I was going over r-bugs and trying to write patches for bugs I can > fix. My questions is should I also send an email to somebody? > > It seems that for some old bugs Bug

Re: [R] named lmer.models in do.call(anova,models)

2013-08-28 Thread Ben Bolker
/lme4/issues The short answer is that this isn't super-easy because the S3 anova() method assumes that the first argument is called 'object'. Various workarounds would be possible -- the simplest would be to set rownames() on the returned object. We could consider adding a 'n

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-21 Thread Ben Bolker
= a*(1/x) + 1 So I *think* we want glm(y~1/x+0+offset(1),family=gaussian(link="inverse")) I'm forwarding this back to r-help. > > I can't see how these models can be equivalent. What am I missing? > > cheers, > > Rolf > > > > O

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-21 Thread Ben Bolker
Rolf Turner xtra.co.nz> writes: > > On 21/08/13 11:23, Ye Lin wrote: > > T > > hanks for your insights Rolf! The model I want to fit is y=x/a+x with > > no intercept, so I transformed it to 1/y=1+a/x as they are the same. > > For crying out loud, they are ***NOT*** the same. The equations y =

Re: [R] Lme4 and syntax of random factors

2013-08-13 Thread Ben Bolker
Robert U yahoo.fr> writes: > > Dear > R-users, > [snip] This question probably belongs on r-sig-mixed-mod...@r-project.org . Followups there, please. > Let's say that I have 2 random effects, A (e.g. species, k=2) and B (e.g. individuals, n=100). I made some research about model syntax,

Re: [R] Problems with displaying Regression Results

2013-08-12 Thread Ben Bolker
TMiller student.unisg.ch> writes: > > Hello guys > > I have the following questions. > I am currently running various regressions using the lm() command. > As a result I get the following: [snip] (it's generally better to just cut-and-paste text into your message ...) > > My question is why

Re: [R] errors with hurdle negative binomial mixed effect models

2013-08-09 Thread Ben Bolker
future reference: the output of summary(SW_GVG) is useful for diagnosis). For more information, search http://glmm.wikidot.com/faq for the word 'rank' Good luck Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] bbmle: mle2: initial value in 'vmmin' is not finite

2013-08-07 Thread Ben Bolker
d* time, and the statistical properties might be different). If the predation probability were fixed this would be Gamma distributed, but I'm not sure how it works out with depletion ... 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] repeated measures logistic regression

2013-07-27 Thread Ben Bolker
Stanislav Aggerwal gmail.com> writes: > > I have searched the r-help archive and saw only one > unanswered post related > to mine. Take a look at the r-sig-mixed-models (@r-project.org) mailing list and archive ... > > My design is as follows. > >- y is Bernoulli response >- x1 is

Re: [R] how to download Journal Citation Reports with R

2013-07-20 Thread Ben Bolker
nto your R session. However, you will probably be violating the terms of service of JCR. You should talk to your librarian about this. When I wanted to do a similar project I worked out a system where I generated the URLs automatically and got a student assistant to (efficiently) go to the URLs and

Re: [R] How to determine the pdf of a gamma distribution using the estimated parameters?

2013-07-12 Thread Ben Bolker
; > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Ben Bolker > Sent: Friday, July 12, 2013 11:58 AM > To: r-h...@stat.math.ethz.ch > Subject: Re: [R] How to determine the pdf of a gamma distribution usi

Re: [R] What is the maximum limit for an array?

2013-07-12 Thread Ben Bolker
Jonsson Bordeaux.inra.fr> writes: > > So If download R 3,my problem will be gone? If you also install it :-) and if you have a 64-bit OS and if you have enough memory to handle the resulting object (see David Winsemius's response). __ R-help@r-pro

Re: [R] How to determine the pdf of a gamma distribution using the estimated parameters?

2013-07-12 Thread Ben Bolker
Kaptue Tchuente, Armel sdstate.edu> writes: > [snip] > With th bar histogram (number of occurrences) > hist<-c(24,7,4,1,2,1,1) of seven equally spaces classes > ]1-4], ]5-8], ]9-12], ]13-16], ]17-20], ]21-24], ]25-28], > I obtained shape=0.8276 and rate=0.1448. > > I would like to know how

Re: [R] What is the maximum limit for an array?

2013-07-12 Thread Ben Bolker
31 - 1 > 1440*720*700*3 [1] 217728 > 2^31-1 [1] 2147483647 So you need R>=3.0.0 (on a 64-bit system). Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Differences between glmmPQL and lmer and AIC calculation

2013-07-11 Thread Ben Bolker
Tonio Pieterek googlemail.com> writes: > [snip] This is really more appropriate for r-sig-mixed-mod...@r-project.org : please refer any followup questions there. > For my Master thesis I collected some behavioral data of fish using > acoustic telemetry. The aim of the study is to compare two d

Re: [R] (lme4) p-values for single terms in mixed models involved in sig interactions

2013-07-07 Thread Ben Bolker
in an experiment start at the same time, you might want to set the intercepts the same, which would give you (time + treatment:time). It's hard to specify this case for two categorical variables; you pretty much have to construct the dummy variables yourself. Ben Bolker _

Re: [R] Subset and order

2013-07-05 Thread Ben Bolker
David Carlson tamu.edu> writes: > > It may be that single and efficient are opposing goals. Two steps > lets you create the subset and then just order each query. > Alternatively, if the data do not change often, create an ordered > version and query that. > I don't know the data.table pack

Re: [R] g2 test...

2013-07-04 Thread Ben Bolker
Fernando Marmolejo Ramos adelaide.edu.au> writes: > [snip] > is it appropriate to use a Log likelihood ratio (G-test) test of independence when dealing with repeated > categorical responses (e.g. 2 by 2 table) instead of the McNemar test? [snip] Not an R question. Try http://stats.stack

Re: [R] R and MatLab implementations of the same model differs

2013-07-04 Thread Ben Bolker
Berend Hasselman xs4all.nl> writes: > > > On 04-07-2013, at 17:15, Jannetta Steyn henning.org> wrote: > > > Hi folks > > > > I have implemented a model of a neuron using Hodgkin Huxley equations in > > both R and MatLab. My preference is to work with R but R is not giving me > > the correct

Re: [R] subset of factors in a regression

2013-07-01 Thread Ben Bolker
Philip A. Viton osu.edu> writes: > suppose "state" is a variable in a dataframe containing abbreviations > of the US states, as a factor. What I'd like to do is to include > dummy variables for a few of the states, (say, CA and MA) among the > independent variables in my regression formula. (T

Re: [R] package expm: matrix powers within a product of matrices: operation precedence

2013-06-18 Thread Ben Bolker
m")), who may or may not be reading this list at present ... 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 co

Re: [R] devtools: rtools not compatible with 3.0.1

2013-06-11 Thread Ben Bolker
he package from there. (Let me know off-list if you want me to pack up the package and send it to you ...) 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-pro

Re: [R] help needed! RMSE

2013-06-10 Thread Ben Bolker
mansor nad hotmail.com> writes: > i need HELPPP!! how do i calculate the RMSE value for two GEV > models?first GEV is where the three parameters are constant.2nd GEV > model a 4 parameter model with the location parameter is allowed to > vary linearly with respect to time while holding the othe

Re: [R] lme function cannot find object

2013-06-06 Thread Ben Bolker
Pfeiffer, Steven miamioh.edu> writes: > I have been using the function lme() from package 'nlme' for several months > now without any problems. Suddenly, it cannot find a factor in my data. > Is this a new bug of some kind? My code and output are below. > Thanks for your help! > -Steve Pfeiffe

Re: [R] Post hoc power analysis for mixed-effects models

2013-06-05 Thread Ben Bolker
pdf to strengthen your background knowledge ... Further mixed-model-relevant questions should probably go to r-sig-mixed-mod...@r-project.org. Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Mixed effects model with a phylogenetic tree/ distance matrix as a random effect

2013-06-03 Thread Ben Bolker
Bert Gunter gene.com> writes: > > Recommendation: Post this to the R-sig-mixed-models list, not here. > > Cheers, > Bert Seconded. Alternatively you could try the r-sig-ph...@r-project.org mailing list, although I think I would try R-s-m-m first. > > On Mon, Jun 3, 2013 at 9:27 AM, Roey

Re: [R] Scale package change comma defaults?

2013-06-02 Thread Ben Bolker
John Kane inbox.com> writes: > I was using the comma() funtion in the scales page and was > wondering how to chage a the defaults. comm(1000) gives me 1,000 > which is what I usually want but how would I change the output to > 1.000. Since the comma() function is just a wrapper for format():

Re: [R] GLMM in R

2013-06-01 Thread Ben Bolker
Milan Bouchet-Valat club.fr> writes: > > Le vendredi 31 mai 2013 à 22:27 -0300, Luis Fernando García Hernández a > écrit : > > Dear Friends, > > > > I am new on R so I ask you to excuse me if this question sounds fool. I > > want to see if there is a significativa relationship between the matin

Re: [R] lmer (multinomial response variable ~ fixed + (1|random), family='"multinomial" ???)

2013-05-30 Thread Ben Bolker
Maggie Wisniewska gmail.com> writes: > > Hello, > I am trying to run glmm to test the effect of the three fixed effects [AGE > (weaned vs. unweaned claf), LOCATION (zoo vs. park), MOTher's social status > (matriarch vs. nonmatriarch)] and one random effect [ID (12 different > calves of whom I h

Re: [R] R 3.0.0

2013-05-24 Thread Ben Bolker
quot;probit")) runs a probit regression. I'd actually be quite curious to hear how you reached this conclusion, in case there is confusing or mis-information going around that we can correct ... Ben Bolker __ R-help@r-project.org mailing l

Re: [R] Rplot save problem after using "identify" with R version 3.0.0

2013-05-22 Thread Ben Bolker
Suparna Mitra gmail.com> writes: > > Hello R experts, > I am having an wired problem to save my RPlot after I use "identify" > option. > Points are identified properly, but when I try to save that image I get > error as: > " Error: first argument must be a string (of length 1) or native symbol

Re: [R] Extract t-statistics from "mer" object

2013-05-20 Thread Ben Bolker
arun yahoo.com> writes: > > Hi, > > Check this link > https://stat.ethz.ch/pipermail/r-help/2008-May/163274.html > A.K. > > >i have a mer object named "model" : > > > >I want to extract  t statistics of the coeeficients from "model". > >Please help me out > > > >package used lme4 >

Re: [R] glmer.nb: function not in downloaded lme4 package?

2013-05-18 Thread Ben Bolker
Alternatively you could try the glmmADMB package, on r-forge. 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 commen

Re: [R] Changing Order of Factor Levels in Mixed Model (nlme)

2013-05-14 Thread Ben Bolker
Edward Patzelt umn.edu> writes: > > R Help - > > Why is that in the results below, changing the order of the factor > (trialType2: levels - DD, SD, DS, SS) changes the estimates in the fixed > effects tests? I think you're not doing what you expected. By sorting the factor, you are _not_ ch

Re: [R] Possible bug in 'data.table'

2013-05-14 Thread Ben Bolker
Manta libero.it> writes: > > Dear R users, > > I may have found a bug in the function 'data.table'. I have a similar > question as the one in this post: > > http://stackoverflow.com/questions/3367190/ aggregate-and-weighted-mean-in-r > [snip] > While I run the command > > temp[,list(we

Re: [R] help

2013-05-12 Thread Ben Bolker
Niloofar.Javanrouh yahoo.com> writes: > I want to analysis of covariance with R software. What > should I do? I would like to have the answer as soon as possible > because I have a presentation in the following 8 hours. In general the respondents on this list are not very sympathetic to "please

Re: [R] Fwd: binomial glm and sole effect of the treatment

2013-05-10 Thread Ben Bolker
Katarzyna Kulma gmail.com> writes: > > Hiya, > > I'm using simple glm binomial models to test the effect of treatment > (factor, 3 levels) on infection prevalence (infected/uninfected): > > ad3<-glm(Infection~ecs, family=binomial, data=eilb) > > but summary() function returns for each of the

Re: [R] How to calculate Hightest Posterior Density (HPD) of coeficients in a simple regression (lm) in R?

2013-05-08 Thread Ben Bolker
Richard Asturia gmail.com> writes: > > Hi! > > I am trying to calculate HPD for the coeficients of regression models > fitted with lm or lmrob in R, pretty much in the same way that can be > accomplished by the association of mcmcsamp and HPDinterval functions for > multilevel models fitted wit

Re: [R] cannot compile R on Cray XE6 HLRS HERMIT

2013-04-29 Thread Ben Bolker
Martin Ivanov abv.bg> writes: > Dear All, I am trying to compile R-3.0 on Cray xe6 (HLRS) HERMIT, > no success so far. Here is my experience: You might be better off posting this to the r-de...@r-project.org mailing list (the list is for developer queries: technically this isn't "developmen

Re: [R] Hi

2013-04-29 Thread Ben Bolker
Fatos Baruti gmail.com> writes: > > What is the entry code formula autocovariance and autocorrelation in R > program for these data? > > a<-c(2,3.5,3.5,2.2,2.2,3.3,2.5,2.5,3.2,2.5,2.5,2.7,1.7,2.7,2.9,2. 3,2.7,3,1.8,2.5,3.1,2.5,2.5,3.2,2.7,1.9,2.6,2.3,2.7,3.2, 2.2,1.5,2.3,2.6,2.5,2.9,2,2.5,2.6

Re: [R] nls: example code throws error

2013-04-26 Thread Ben Bolker
Keith Jewell campden.co.uk> writes: > Others have pointed out that the error is probably from an unclean > environment. > Completely OT, but "an unclean environment" sounds sort of scary to me. Like it contains zombies or something. I don't know a better, short way to express the idea though

Re: [R] find lowest AIC of a LM

2013-04-18 Thread Ben Bolker
Fabio Berzaghi dmu.dk> writes: > > hello all, > > I have a simple linear model with 4/5 variables that I am trying to fit. > I would like to find the lowest AIC value with any combination of all > the variables. I would like to implement this with a while/for loop. > Possibly I would like to

Re: [R] Strange error with log-normal models

2013-04-16 Thread Ben Bolker
peter dalgaard gmail.com> writes: > On Apr 16, 2013, at 22:20 , Noah Silverman wrote: > > > My challenge here is finding the right model for this data. > Originally it was a nice count of students. Relatively easy to > model with a zero inflated Poisson model. The resulting residuals > seeme

Re: [R] Plotting a curve for a Holling Type III Functional Response

2013-04-08 Thread Ben Bolker
Student middlebury.edu> writes: > > Hey, > > So I have a scatter plot and I am trying to plot a curve to fit the data > based on a Holling Type III functional response. My function is this: > It's hard to see how 'size=DBH' could make sense; 'size' is an overdispersion parameter ... I guess it

Re: [R] Deviance in Zero inflated models

2013-04-03 Thread Ben Bolker
usual definition of the deviance (there are sometimes some subtle issues about the baseline model/additive constant). It would also be helpful to say what package you're using (pscl?), since zero-inflated models are not part of base R ... Ben Bolker __

Re: [R] Is DUD available in nls()?

2013-04-02 Thread Ben Bolker
his is not necessarily the most efficient/highly tuned possibility, but it is one reasonably quick way to get going (you can substitute other derivative-free optimizers, e.g. library("optimx") mle2(...,optimizer="optimx",method="bobyqa") (I think).

Re: [R] lmer, p-values and all that

2013-03-27 Thread Ben Bolker
On 13-03-27 10:10 PM, David Winsemius wrote: > > On Mar 27, 2013, at 7:00 PM, Ben Bolker wrote: > >> Michael Grant colorado.edu> writes: >>> Dear Help: >> >>> I am trying to follow Professor Bates' recommendation, quoted by >>> Profe

Re: [R] lmer, p-values and all that

2013-03-27 Thread Ben Bolker
methods for testing significance/inclusion of random factors (short answer: you should *generally* try to make the decision whether to include random factors or not on _a priori_ grounds, not on the basis of statistical tests ...) Ben Bolker __ R-help@r-pr

Re: [R] gamma regression & zeros

2013-03-25 Thread Ben Bolker
Sören Prehn iamo.de> writes: > Dear all, I have a problem with gamma regression (glm - family = > Gamma) and zeros in R. The problem is the following when I try to > estimate a dataset without zeros (endogenous variable) there is no > problem. However, if I try to do the same with zeros I always

Re: [R] PGLMM in Picante Question

2013-03-21 Thread Ben Bolker
Frank Burbrink gmail.com> writes: > Using the PGLMM function in Picante it is theoretically possible to > generate other models (than the 5 flagged ones indicated) by > differently structuring the independent variable (Y), dependent > variables (X), and covariance matrices (VV). I was wondering

Re: [R] Error message installing package R package

2013-03-21 Thread Ben Bolker
Pramod Anugu jsums.edu> writes: > I am getting error messages while installing R package lme4. Please advice This would be better on the r-sig-mixed-mod...@r-project.org list. You haven't told us, but I'm guess from what you've pasted below that you're on a Unix system, and most obviously o

Re: [R] how to do association study based on mixed linear model

2013-03-19 Thread Ben Bolker
Yao He gmail.com> writes: > > Dear All: > > I want to do association study based on mixed linear model, > > My model not only includes serval fixed effects and random effects but > also incorporates some covariates such as "birth weight". > Otherwise, the size of the data are about 180 individ

Re: [R] RGL 3D plots are flat. Please Help

2013-03-18 Thread Ben Bolker
Pascal Oettli ymail.com> writes: > > Hi, > > Try by multiplying "z" by 1000. > > HTH > Pascal Or try using persp3d() instead of rgl.surface() __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] How many samples ACTUALLY used in regression?

2013-03-18 Thread Ben Bolker
Federico Calboli imperial.ac.uk> writes: > is there a simple way that covers all regression models to extract > the number of samples from a data > frame/matrix actually used in a regression model? > > For instance I might have a data of 100 rows and 4 colums > (1 response + 3 explanatory vari

Re: [R] !0 + !0 == !0 - !0

2013-03-18 Thread Ben Bolker
pisms due to operator precedence. > Maybe FAQ 7.31 was referred to not for its direct relevance but as a measure of the "old-hand-ness" of the people who will get the joke. I have to admit it took me a minute ... Ben Bolker __ R-hel

Re: [R] Same eigenvalues but different eigenvectors using 'prcomp' and 'principal' commands

2013-03-14 Thread Ben Bolker
pal() is scaling them (maybe the documention says). (1,1) and (-1,1) , or (1,1) and (1,-1), would have been equally valid choices. Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] EEG data for time series

2013-03-10 Thread Ben Bolker
Bert Gunter gene.com> writes: > > (Sorry, failed to cc the list) > > On Sat, Mar 9, 2013 at 10:11 PM, Bert Gunter gene.com> wrote: > [snip] > > But quoting George Box (from a long time ago) on the same sort of > query for a much different problem: "Well, of course the first thing > to

Re: [R] lmer (LME4) and survey standard error

2013-03-09 Thread Ben Bolker
tor) > #X = independent variables (numeric, matrix) > > m = lmer(Y ~ (1|G) + X) > [snip] I suggest (1) taking a look at the weights= argument to see if it does what you need and (2) asking this question on the r-sig-mixed-models list, where there may be

Re: [R] read.table freezes the computer

2013-03-09 Thread Ben Bolker
Jie gmail.com> writes: [snip] > I have a txt file to read into R. The size of it is about 500MB. > This txt file is produced by calling write.table(M, file = > "xxx.txt"), where M is a large matrix > After running MM = read.table("xxx.txt"), the R gui keeps a cpu > core/thread fully occupied fo

Re: [R] optim hangs without warnings or error

2013-03-07 Thread Ben Bolker
Katja Hebestreit uni-muenster.de> writes: > > Hello, > > optim hangs for some reason when called within the betareg function > (from the betareg package). > > In this special case, the arguments which are passed to optim cause > never ending calculations. > > I uploaded the arguments passed t

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-06 Thread Ben Bolker
Kjetil Kjernsmo ifi.uio.no> writes: > > All, > > I have just returned to R after a decade of absence, and it is good to > see that R has become such a great success! I'm trying to bring Design > of Experiments into some aspects of software performance evaluation, and > to teach myself that,

Re: [R] Random Sample with constraints

2013-03-03 Thread Ben Bolker
underspecified, so no, we can't. Any random sample will by definition be a sample from _some_ distribution. If you give more context someone might able be to help you with a solution. Ben Bolker __ R-help@r-project.org mailing list https:/

Re: [R] Separation issue in binary response models - glm, brglm, logistf

2013-02-28 Thread Ben Bolker
Xochitl CORMON ifremer.fr> writes: > Le 28/02/2013 17:22, Ben Bolker a écrit : > > Xochitl CORMON ifremer.fr> writes: > >> I am encountering some issues with my data and need some help. I am > >> trying to run glm analysis with a presence/absence variable as &

Re: [R] Separation issue in binary response models - glm, brglm, logistf

2013-02-28 Thread Ben Bolker
Xochitl CORMON ifremer.fr> writes: > Dear all, > > I am encountering some issues with my data and need some help. > I am trying to run glm analysis with a presence/absence variable as > response variable and several explanatory variable (time, location, > presence/absence data, abundance data)

Re: [R] Negative Binomial Regression - glm.nb

2013-02-28 Thread Ben Bolker
), start=list(logmu=[starting value for logmu intercept], logbeta=[starting value for logbeta intercept]), data=...) should work ... Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

Re: [R] Fitting this data with a gaussian would be great

2013-02-22 Thread Ben Bolker
rs of the model): mean(small), sd(small) 2. use an intercept-only model with lm(small~1) or glm(small~1) (although the latter is definitely overkill) 3. You *can* use a nonlinear fitting method to estimate an intercept-only model nls(small~a,start=li

Re: [R] HELP!!!

2013-02-22 Thread Ben Bolker
ttp://www.r-project.org/posting-guide.html Some google-detection (searching for "if sigma2$id error") suggests that the OP is using the ercomp package, but beyond that the question is still (as you suggest) unanswerable. Ben Bolker __ R-help@r

Re: [R] locating boxplot in bwplot (lattice)

2013-02-22 Thread Ben Bolker
Elaine Kuo gmail.com> writes: > > Hello > > I am using lattice bwplot to draw migration distance of three groups of > birds. > > The boxplots from the left to right is displayed > in alphabetic order of the boxplot names, as the default setting. > > However, I would like the boxplots from the

Re: [R] Seeing Global Workspace and dealing with attach and detach

2013-02-19 Thread Ben Bolker
Jeff Newmiller dcn.davis.ca.us> writes: > In general, creating variables while attached leads to problems such > as you describe. Normally the recommendation is to avoid the use of > attach and detach entirely in favor of explicit reference to the > data frame using [[]], [,], $, and the data= ar

Re: [R] nested random factor using lme produces errors

2013-02-18 Thread Ben Bolker
melswed slu.se> writes: > > I understand. I want to specify that drug is only a fixed factor and family > should be the only random factor. So maybe, my R code is wrong If I > specify random=~1|drug/family it is only because I wanted to specify that > family is nested within drug. Then yo

Re: [R] nested random factor using lme produces errors

2013-02-17 Thread Ben Bolker
melswed slu.se> writes: > > Hi, > > I am running a mixed-effect model with a nested-random effect. I am > interested in gut parasites in moose. I has three different type of > treatment that I applied to moose which are from different "families". My > response variable is gut parasites and the

Re: [R] standard error very high in maximum liklihood fitting

2013-02-12 Thread Ben Bolker
Abu Naser hotmail.com> writes: > I have been trying to fit my data (only right censored) > with gumbel distribution using fitdistrplus. I am > getting very high standard error. I have been wondering why. > The followings are the outputs: > > fit1=fitdistcens(dr0, "gumbel", start=list(a=99, b=0.

Re: [R] Exact p-values in lm() - rounding problem

2013-02-12 Thread Ben Bolker
Torvon gmail.com> writes: > > Thank you, Uwe. > > summary(m1) gives me p-value estimates of: > (Intercept) 2e-16 > x1 6.9e-15 > x2 1.9e-07 > x3 2.7e-09 > > While coef(summary(m1))[,4] gives me: > (Intercept) 3.0e-23 > x1 5.7e-13 > x2 2.6e-07 > x3 1.7e-17 > > While the first one confirms my su

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