Re: [R] nc file

2024-06-04 Thread Ben Bolker
This question is unfortunately too vague for us to help you. A little bit of web-searching turned up this tutorial: maybe that will help? https://rpubs.com/boyerag/297592 On 2024-06-04 6:49 a.m., Farzad Ghooshi wrote: Hello I am a PhD student in ecology. The subject of my thesis is climate

Re: [R] Column names of model.matrix's output with contrast.arg

2024-06-17 Thread Ben Bolker
It's sorta-kinda-obliquely-partially documented in the examples: zapsmall(cP <- contr.poly(3)) # Linear and Quadratic output: .L .Q [1,] -0.7071068 0.4082483 [2,] 0.000 -0.8164966 [3,] 0.7071068 0.4082483 FWIW the faux package provides better-named alternatives.

Re: [R] I have Problem using the Pipe Command

2024-06-18 Thread Ben Bolker
You probably have to update your R version. The native pipe |> wasn't introduced until R version 4.4. R.version.string (among others) will tell you what version you have. If you don't want to do that, install and load the 'magrittr' package and change |> to %>% everywhere. On 2024-06-18

Re: [R] Naming output file

2024-06-24 Thread Ben Bolker
As stated earlier in the thread, this is where you would need to use get(paste0("bop", im)) [the analogue of assign]. This unwieldiness is the exact reason that several posters are encouraging you to change your approach and store these objects in a list ... On 2024-06-24 8:16 a.m., Steven

Re: [R] Regarding the Security Vulnerability CVE 2024 - 27322

2024-06-26 Thread Ben Bolker
ot;, but they did allow us to use R. It would have made things very inconvenient if I had told them about the system() command, so I didn't bother ... Ben Bolker __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.e

Re: [R] a fast way to do my job

2024-08-09 Thread Ben Bolker
You can also fit a linear model with a matrix-valued response variable, which should be even faster (not sure off the top of my head how to get the residuals and reshape them to the dimensions you want) On Fri, Aug 9, 2024 at 9:31 PM Bert Gunter wrote: > > See ?lm.fit. > I must be missing somethi

Re: [R] Determining the Correct Help List

2024-08-12 Thread Ben Bolker
And the author & maintainer of rgl is pretty active here too ... On 2024-08-12 4:15 p.m., Bert Gunter wrote: As lattice is a core R package, I'd say right here, R-Help. -- Bert On Mon, Aug 12, 2024 at 1:07 PM Erin Hodgess wrote: Hello everyone: I have a few questions about using rgl, lat

Re: [R] allequal diff

2024-08-15 Thread Ben Bolker
Digging into the code for raster::compareRaster(): library(raster) r <- raster(ncol=3, nrow=3) values(r) <- 1:ncell(r) r2 <- r values(r2) <- c(1:8,10) all.equal(getValues(r), getValues(r2), tolerance = 0) [1] "Mean relative difference: 0.111" compareRaster has fancier machinery intern

Re: [R] boxplot notch

2024-08-16 Thread Ben Bolker
I don't see anything obviously wrong here. There may be something subtle, but we probably won't be able to help without a reproducible example ... On 2024-08-16 9:24 a.m., SIBYLLE STÖCKLI via R-help wrote: Dear community I tried the following code using geom_boxplot() and notch=TRUE. D

Re: [R] allequal diff

2024-08-18 Thread Ben Bolker
  To do this, I think you'll have to compare the extent (using the extent() function) and/or number of rows and columns and/or resolution of the two rasters. (Print the source code of compareRasters() and dig through it to see what's being compared ...) On 8/18/24 14:00, SIBYLLE STÖCKLI via R-

Re: [R] allequal diff

2024-08-18 Thread Ben Bolker
   The OP's original problem is that the all.equal method for raster objects (raster:::all.equal.raster), which is a wrapper around the compareRaster() function, compares a bunch of different properties of rasters (extent, resolution, values, etc.) and only returns a single overall logical (TRU

Re: [R] A question on Statistics regarding regression

2024-08-24 Thread Ben Bolker
  This is probably better for Cross Validated [https://stats.stackexchange.com]. Surprisingly, I can't quickly find an answered question on this topic. My "tl;dr" answer would be: "inflated" relative to what? Having an unbalanced sample certainly decreases the *power* of an analysis, but there'

Re: [R] Adding parameters for Benchmark normal distribution in shapiro.test

2024-09-02 Thread Ben Bolker
From Shapiro and Wilk's paper: > The objective is to derive a test for the hypothesis that this is a sample from a normal distribution with unknown mean mu and unknown variance sigma^2 That is, the estimates of the mean and SD are folded into the derivation of the test statistic. If y

Re: [R] Calculation of VCV matrix of estimated coefficient

2024-09-04 Thread Ben Bolker
The number you need for MSE is sum(residuals(model)^2)/df.residual(model) On Wed, Sep 4, 2024 at 3:34 PM Daniel Lobo wrote: > > Hi, > > I am trying to replicate the R's result for VCV matrix of estimated > coefficients from linear model as below > > data(mtcars) > model <- lm(mpg~disp+hp, data=m

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] 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] 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] (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] 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] 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] 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
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
; > -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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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-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] confirming a formula for use with lmer

2012-12-19 Thread Ben Bolker
Matthew Panichello nmr.mgh.harvard.edu> writes: > [snip] > > I am interested in the effects of variables 'prime','time', and 'mood' > on 'reaction_time' while taking into account the random effect > 'subjects.' I've read through documentation on lme4 and came up with the > following formula f

Re: [R] Problem loading .r file

2012-12-20 Thread Ben Bolker
Christofer Bogaso gmail.com> writes: > [snip] > I was trying to load a .r file using source() and load() functions. > Although I could be able to load the codes (mainly few user defined > functions) written in that .r. file correctly, however getting > following error: > > > source("D:/Book

Re: [R] colmeans not working

2012-12-23 Thread Ben Bolker
eliza botto hotmail.com> writes: > Dear useRs,You must all the planning for the christmas, but i am > stucked in my office on the following issue i had a file containg > information about station name, year, month, day, and discharge > information. i opened it by using following command > > dat

Re: [R] Spammer radhi

2012-12-24 Thread Ben Bolker
tatistics are generally intended to guard against non-demonic intervention only. 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.htm

Re: [R] R graphs from database

2012-12-26 Thread Ben Bolker
David Osborne gmail.com> writes: > > Browsing the web recently, I came across what I think is a new utility for > generating an interactive, web-based R graph of data from a database. The > generated graph can be manipulated by a user to choose different data, > limits, etc. I would like to inve

Re: [R] Is there a package to output midi files for sonification of data

2012-12-26 Thread Ben Bolker
Suzen, Mehmet gmail.com> writes: > > Hi Greg, > > you can try tuneR : > http://cran.r-project.org/web/packages/tuneR/ > > Best, > -m tuneR writes Wave (.WAV?) files as output; it can also write output suitable for lilypond input -- and lilypond can write MIDI output. Bottom line, I th

Re: [R] Ridge Regression variable selection

2012-12-27 Thread Ben Bolker
Frank Harrell vanderbilt.edu> writes: > > Unlike L1 (lasso) regression or elastic net (mixture of L1 and L2), L2 norm > regression (ridge regression) does not select variables. Selection of > variables would not work properly, and it's unclear why you would want to > omit "apparently" weak vari

Re: [R] Is there a package to output midi files for sonification of data

2012-12-27 Thread Ben Bolker
On 12-12-27 03:04 PM, Greg Hooper wrote: > thanks again Mehmet - the midicsv utility is in C (of which I am > ignorant). I will have a look at that to see if I can write a native R > version. It only has to do midi_in and midi_out, the rest can be left up > to R. That will take me ages, but I can j

Re: [R] R crashing inconsistently within for loops

2012-12-28 Thread Ben Bolker
Steve Powers nd.edu> writes: > > Hello, > > This one has been bugging me for a long time and I have never found a > solution. I am using R version 2.15.1 but it has come > up in older versions of R I have used over the past 2-3 years. > > Q: Am I wrong to expect that R should handle hundreds

Re: [R] New Version of R?

2013-01-04 Thread Ben Bolker
ant the students to have > the latest version. > > Thanks very much, > Sincerely, > Erin > http://developer.r-project.org/ says "the next release is not scheduled yet". In addition, there was a recent e-mail on one of the lists from Peter Dalgaard saying that release 3.0.0

Re: [R] MT940 and MT942

2013-01-04 Thread Ben Bolker
Suzen, Mehmet gmail.com> writes: > > Hello List, > > Are there any R package that can process MT940/942? > > Thanks > > mem I find it hard to say because I have no idea what those formats are (although googling suggests they're banking codes). library("sos") and using findFn() on "MT940

Re: [R] Using objects within functions in formulas

2013-01-09 Thread Ben Bolker
han I would like it to be. To the best of my knowledge I have solved most of these problems in the development version of lme4, but another test case will be useful. As long as there is a reasonable workaround I'm unlikely to put the effort into fixing the stable version of lme4 (sorry ...) Fo

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Ben Bolker
Ved P. Sharma gmail.com> writes: > I am trying to draw a dotted circle by using symbols command: > > symbols(0, 0, circles = 1, inches = FALSE, fg = 'gray', lty=2) > > But it gives me a solid line. I was just wondering whether am I making a > mistake? > Works for me (although it's a dashed

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Ben Bolker
ached): > [1] tools_2.15.2 > > > Hope this helps, > > Rui Barradas > Em 12-01-2013 17:02, Ben Bolker escreveu: >> Ved P. Sharma gmail.com> writes: >> >>> I am trying to draw a dotted circle by using symbols command: >>> >>>

Re: [R] Nesting fixed factors in lme4 package

2013-01-18 Thread Ben Bolker
:B, i.e. no main effect of B. Nesting would typically make more sense in a random-effects context where the meaning of "B=1 in unit A=1" is different from "B=1 in unit A=2", i.e. where you don't want or it doesn't make sense to estimate a main effect of B across levels of

Re: [R] Error in mer_finalize(ans) : Downdated X'X is not positive definite, 8.

2013-01-19 Thread Ben Bolker
Yoav Avneon bgu.ac.il> writes: > I have conducted an experiment in order to examine predation pressure in the > surroundings of potential wildlife road-crossing structures. I have > documented predation occurrence (binary…) in these structures and calculated > several possible explanatory variab

Re: [R] Ordered Probit/Logit with random coefficients

2013-01-21 Thread Ben Bolker
uggested that when you did re-post to the r help lists, you should post to r-sig-mixed-mod...@r-project.org ; this is the general R help list, which won't be much more useful to you than StackOverflow. Ben Bolker __ R-help@r-project.org mailing list

Re: [R] Erro message in glmmADMB

2013-01-22 Thread Ben Bolker
peixotop leuphana.de> writes: > I am using glmmADMB and when I run some models, I recieve the following > message: > > Erro em glmmadmb(eumencells ~ 1 + (1 | owners), data = pred3, family = > "nbinom", : > The function maximizer failed (couldn't find STD file) > Furthermore: Lost warning messa

Re: [R] Evaluating the significance of the random effects in GLMM

2013-01-23 Thread Ben Bolker
Gabriela Agostini gmail.com> writes: > [snip] > I am working with GLMM using the binomial family > I use the following codes > > I dropped no significant terms, refitting the model and comparing the > changes with likelihood: > > G.1<-lmer(data$Ymat~stu+spi+stu*sp1+(1|ber),data=data,family="

Re: [R] how to delete the null elements in list

2013-01-25 Thread Ben Bolker
uu > [[3]] > item_id prod > 1 2 > [[4]] > item_id prod > 1 2 > 2 4 How about suu[!sapply(suu,is.null)] ? (Haven't tested, but I would expect it to work ... Of course, the result won't have elements [[3]] and [[4]], it will have

Re: [R] Removal of columns from matrix where all values of the column are identical.

2013-01-25 Thread Ben Bolker
Benjamin Ward (ENV uea.ac.uk> writes: > I'd like to write a piece of code which will remove columns from a matrix, if the column contains only one > value, say every value in the column is a "3": > > Matrix <- matrix(NA, nrow=5, ncol=4) > Matrix[,1] <- c(1,2,3,4,5) > Matrix[,2] <- c(3,3,3,3,3) >

Re: [R] Package: VennDiagram. Error in draw.pairwise.venn Impossible: cross section area too large

2013-01-27 Thread Ben Bolker
Fabrice Tourre gmail.com> writes: > > Dear list, > > When I use VennDiagram package, I got a error as follow: > > venn.plot <- draw.pairwise.venn( > area1 = 3186, > area2 = 325, > cross.area = 5880); > > Error in draw.pairwise.venn(area1 = 3186, area2 = 325, cross.area = 588) : > Impossible

Re: [R] Adjusted R-squared formula in lm()

2013-01-28 Thread Ben Bolker
int)/rdf) Does that answer your question? 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, minim

Re: [R] starting values in glm(..., family = binomial(link = log))

2013-01-29 Thread Ben Bolker
Fischer, Felix charite.de> writes: > > Dear R-helpers, > i have a problem with a glm-model. I am trying to fit models with > the log as link function instead of the logit. However, in some > cases glm fails to estimate those models and suggests to give start > values. However, when I set star

Re: [R] Packages with functionality related to Oil/Gas exploration

2013-01-30 Thread Ben Bolker
Keith Weintraub gmail.com> writes: > > Folks, > > As the subject describes: I would like to know if there are > packages that have functionality tailored for > standard Oil/Gas exploration and monetization. Check out the "sos" package: it will help you answer the question yourself, probably

Re: [R] Mixed Models: Contribution of random variable to final estimate

2013-02-02 Thread Ben Bolker
Luis Reino isa.utl.pt> writes: > > Dear all, > We want to test if the invasiveStatus is predicted by the amount > (quant) of animals arriving to a country of a certain species > (taxonid). We are using lmer to perform the model. In general lmer questions belong on r-sig-mixed-mod...@r-proje

Re: [R] Fortan to R

2013-02-03 Thread Ben Bolker
eliza botto hotmail.com> writes: > > > Dear UseRs, > How can i connect my FTN95 fortran compiler with R in window 7? Take a look at the R extensions manual http://cran.r-project.org/doc/manuals/R-exts.html section 5 ... __ R-help@r-project.org ma

Re: [R] lmer - BLUP prediction intervals

2013-02-05 Thread Ben Bolker
e uncertainty in the conditional modes and in the overall slope parameter and compute the overall variance by adding the variances ... ? (Not sure that's right.) Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] calling outside program to run from R - similar to X command in SAS

2013-02-07 Thread Ben Bolker
Leigh Michelle Williams gsu.edu> writes: > > I'm new to R and have not been able to find what I am looking for online. > I found the system command but that > seems to be used for getting lists of directories, etc. > > I am trying to replicate something that I used to do in SAS. I am simulating

Re: [R] Problem reading dates from Excel

2013-02-08 Thread Ben Bolker
David Winsemius comcast.net> writes: > On Feb 8, 2013, at 10:55 AM, Edwin Isensee wrote: > > > I'm using the read.xls function from gdata package to read one Excel file, > > like the example below: > > > > library(gdata) > > my_file <- '/Users/Desktop/Project.xlsx' > > valores <- read.xls(my_fi

Re: [R] exponential model in R

2013-02-10 Thread Ben Bolker
catalin roibu gmail.com> writes: > > Dear R users, > I don't know how to compute an exponential model like this: > proc=a*exp(b*cls), or proc=a*exp(b*cls)+c*exp(d*cls). Please help me to > solve this problem! > > Thank you! > > My data is: This still doesn't make much sense/have much contex

Re: [R] A Hodgkin Huxley Model

2013-02-10 Thread Ben Bolker
Jannetta Steyn henning.org> writes: > > Hi All > > It has been suggested to me that the folks in this list might be able to > help me out of my misery. > > As part of my learning curve to building a rather detailed model of a small > neurone complex I am implementing some existing models in R.

Re: [R] A Hodgkin Huxley Model

2013-02-10 Thread Ben Bolker
On 13-02-10 01:22 PM, David Winsemius wrote: > > On Feb 10, 2013, at 8:09 AM, Ben Bolker wrote: > >> Jannetta Steyn henning.org> writes: >> >>> >>> Hi All >>> >>> It has been suggested to me that the folks in this list might be

Re: [R] different behavior of $ with string literal vs string variable as argument

2013-02-10 Thread Ben Bolker
Duncan Murdoch gmail.com> writes: > > On 13-02-10 4:06 PM, David Romano wrote: > > Hi everyone, > > > > I ran into the issue below while trying to execute a command of the form > > > > apply(list.names,1, function(x) F(favorite.list$x) ) > > > > where list.names is a character vector containing

Re: [R] Training with very few positives

2013-02-11 Thread Ben Bolker
size of your data set is 20, which means it's very small, which means you may just have reached the limits of your predictive power ... Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

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

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

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