Re: [R] the error in DoSimulateRF function

2010-03-14 Thread Ben Bolker
maddy gmail.com> writes: > > > Hello, > > I did not understand what you mean by updating the system. I am new > user of R and I downloaded R a few days ago. Also I installed the > required packages for my program(geoR, randomFields), there was just > one version I could see for the packages. >

Re: [R] likelihood ratio test between glmer and glm

2010-03-14 Thread Ben Bolker
Davnah Urbach dartmouth.edu> writes: > Thanks for this answer but does that mean that working > with the deviances is better? Or how else could I > evaluate the importance of my random terms? You should probably (a) search the archives of the r-sig-mixed-models mailing list and (b) ask this

Re: [R] package debug not available in Ubuntu

2010-03-18 Thread Ben Bolker
xist for Ubuntu? Your problem is probably R 2.7.1 (several years old) rather than Ubuntu. I have no problem installing it (Ubuntu 8.10, R 2.10.1). Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Put square brackets as column name in a data frame

2010-03-19 Thread Ben Bolker
Paul- aurynia.com> writes: > > > names(nouvTable) = c("ID","X[m]","Y[m]","Z[m]") > Or read the table with check.names=FALSE . Note that this can lead to later hassles with referencing the columns; for example you would need nouvTable$`X[m]` rather than nouvTable$X[m]

Re: [R] DESIGN OF EXPERIMENTS

2010-03-19 Thread Ben Bolker
IST POSTS: IT IS TAKEN AS 'SHOUTING' ... good luck 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] Problem specifying Gamma distribution in lme4/glmer

2010-03-21 Thread Ben Bolker
Matthew Giovanni gmail.com> writes: > > Dear R and lme4 users- > > I am trying to fit a mixed-effects model, with the glmer function in > lme4, to right-skewed, zero-inflated, non-normal data representing > understory grass and forb biomass (continuous) as a function of tree > density (indicate

Re: [R] Problem specifying Gamma distribution in lme4/glmer

2010-03-21 Thread Ben Bolker
Dieter Menne menne-biomed.de> writes: > Ben Bolker wrote: > > 3. zero-inflated data may not be particularly well-represented > > by a Gamma distribution: if you actually have a significant number > > of exactly-zero values, you may want to analyze your data in tw

Re: [R] Alternate error structures in lme4?

2009-06-26 Thread Ben Bolker
rther messages should probably be directed to the r-sig-mixed-mod...@r-project.org mailing list. Ben Bolker -- View this message in context: http://www.nabble.com/Alternate-error-structures-in-lme4--tp24226643p24227667.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] help with hexbin package

2009-06-28 Thread Ben Bolker
RAVI KAPOOR wrote: > > Dear All > > i am trying to figure out the use of hexbin function in the hexbin package > --can any one send me a working example of the same > > The > example(hexbin) ---option is of not much use > > You're probably going to have to provide more information. "This

[R] locale changing on Windows

2009-07-01 Thread Ben Bolker
_TIME","en_US") (for example so that we can convert dates like "1970-jan-01" with as.Date(x,"%Y-%b-%d") but keep getting reports that this is not honored by the OS. Does anyone have useful pointers? thanks Ben Bolker

Re: [R] MCMC/Bayesian framework in R?

2009-07-02 Thread Ben Bolker
and returns likelihood*prior ... whether MCMCpack is "efficient" enough depends on what you want to do -- it is very hard to get efficient Bayesian solutions without hand-tuning them or taking advantage of the structure of the problem (in a way that you can't do because you're tre

Re: [R] is AIC always 100% in evaluating a model?

2009-07-03 Thread Ben Bolker
a p-value of 0.05 under the LRT test is 1.92, while the log-likelihood difference required to say that a model is expected to have better predictive capability/lower AIC is 1) -- but since they are designed to answer such different questions, it's not even a fair comparison. Ben Bo

Re: [R] Simple one

2009-07-03 Thread Ben Bolker
JoK LoQ wrote: > > Just a quickly beginner's question. > > I wanna find the mean only from the values from a column related to > specific values from another one. Like, theres a 'region' column, i want > the mean of the value on 'profit' column only from "south" sells from > 'region' column >

Re: [R] is AIC always 100% in evaluating a model?

2009-07-04 Thread Ben Bolker
ce=UI&version=1.0&verb=Display&handle=euclid.aoas/1239888367 > > Haven't read the paper yet, but I would say that makes sense -- > pchisq(3.84,1,lower.tail=FALSE) [1] 0.05004352 > pchisq(2,1,lower.tail=FALSE) [1] 0.1572992 -- Ben Bolker Associate profe

Re: [R] Dump plots to powerpoint?

2009-07-07 Thread Ben Bolker
Why not directly generate a large PNG file (which will be much better for line art than JPG anyway)? Or EMF? See http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:export [Of course, this doesn't answer the original question ... to which I suspect the answer is "no".] Mark

Re: [R] Density value over 1 using density function

2009-07-07 Thread Ben Bolker
t; > > It's a probability density, not a probability function. The vertical range doesn't have to be restricted between 0 and 1. In fact, if the horizontal range is narrow enough then the maximum must be > 1, in order for the area under the curve to equal 1. Ben Bolker -- View th

Re: [R] nested model with random factors

2009-07-08 Thread Ben Bolker
as fixed, you probably won't be able to get a reliable estimate of its associated variance. * I'm not sure that you'll be able to make very much use of the ordering of the factors (unless you want to be extreme and treat them as continuous covariates, i.e. fit a linear trend) in the

Re: [R] generalized linear model (glm) and "stepAIC"

2009-07-10 Thread Ben Bolker
equivalent to lm(). > 3) How should I interpret the dispersion value R give me (in the case > reported it was "7.3")? I mean, what range of values (if it does exist) > I would expect to make the result reliable in the case of > "family=gaussian" (I'm not

Re: [R] generalized linear model (glm) and "stepAIC"

2009-07-11 Thread Ben Bolker
le to use as link function a >>> "negative binomial" as I previously did in SAS because of >>> negative values of response variable (as R "told" me when I >>> tried) >>> >> Is this a question? As above, glm() with gaussian family and >> ide

[R] package help [was: Re: R-help Digest, Vol 77, Issue 13]

2009-07-12 Thread Ben Bolker
to remember to use an informative subject line ... cheers Ben Bolker -- View this message in context: http://www.nabble.com/Re%3A-R-help-Digest%2C-Vol-77%2C-Issue-13-tp24447941p24453201.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] re gression with replication

2009-07-13 Thread Ben Bolker
AgusSusanto wrote: > > Dear all, > I would like to fit a linear regression with replication (on each year, > observation is replicated, e.g 4 times). The independent variable ranges > for instance 1-5 year, so I expect to have a linear fit of 5 points. > For that purpose I do these (with dummy

Re: [R] Trig functions strange results

2009-07-14 Thread Ben Bolker
wse[1]> cos(x) > [1] 6.123032e-17 > > I am not sure why I am getting one values when I am using a variable that > stores the value and another when I use the value directly. Am I missing > something here? > > Because you are not looking at the full precision of th

Re: [R] SOS! error in GLM logistic regression...

2009-07-14 Thread Ben Bolker
ontained, reproducible code. Can you give us a reproducible example, i.e. your data or a subset thereof that we can use to generate the same error message? By the way, glm(V1 ~ ., data=mytraindata, family=binomial) should work equally well (you don't need to specify mytraindata$ before V

Re: [R] GLM Gamma Family logLik formula?

2009-07-15 Thread Ben Bolker
thing that appears inside the Gamma or lgamma() function) as "shape" <http://www.stata.com/help.cgi?glm>. Oh well. good luck Ben Bolker -- View this message in context: http://www.nabble.com/GLM-Gamma-Family-logLik-formula--tp24504030p24508346.html Sent from th

Re: [R] Question regarding package submission to CRAN

2009-07-16 Thread Ben Bolker
Gates, Michael wrote: > > > Members, > I recently submitted my first package to the submissions ftp site on CRAN > (7.3.09). The package has remained on the server since with no action? Do > package review/updates occur monthly? When I submitted, I sent an email to > CRAN to let them know abou

Re: [R] rnorm

2009-07-16 Thread Ben Bolker
Steve Lianoglou-6 wrote: > > Hi, > > On Jul 16, 2009, at 4:54 PM, Jose Narillos de Santos wrote: > >> Hi I want to simulate random numbers normal distributed with this size >> (2000,1). >> >> I tried this but my computer exhaust there is a fast way to make it? >> >> >> randz<-matrix(rnorm

Re: [R] Error with r2winbugs

2009-07-16 Thread Ben Bolker
y mean "lamdba[i]" and not "lambda[i]" in line 3? Otherwise, I don't know (and you should probably ask the question on a BUGS list rather than an R list ...) Ben Bolker -- View this message in context: http://www.nabble.com/Error-with-r2winbugs-tp24520746p24525264.html

Re: [R] rnorm

2009-07-16 Thread Ben Bolker
Don MacQueen wrote: > > When I try this: > >> tmp <- randz<-matrix(rnorm(200),2000,1) >> dim(tmp) > [1] 2000 1 > > It gives a result in less than one second. Very quick. And the > resulting matrix is not alarmingly big. > > There must be some other problem. Perhaps your compu

Re: [R] package X12

2009-07-19 Thread Ben Bolker
ather from a bit of googling that X12 is a time-series analysis package from the US Census Bureau, and that the x12 package provides an R interface. Have you followed any available installation instructions that come with the package? Have you tried contacting the package author (see help(packa

Re: [R] Updating an object

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

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

2009-07-21 Thread Ben Bolker
1Rnwb wrote: > > > [snip] > > The suggestion that consult the statistician is kind of funny as the > statistician in my center is my co-mentor and from past 5 years he is > sitting on the data without any output. > > I am not here to ask someone to do my data analysis, but to get an > und

Re: [R] All possible linear models given multiple explaining variables

2009-07-22 Thread Ben Bolker
hadley wrote: > > Have a look at the meifly package, which also includes tools for > visualising the resulting models. > Hadley > > On Wed, Jul 22, 2009 at 7:28 AM, Thomas A. Groen wrote: >> Hi, >> >> I would like to have a script/function (or write one) that can calculate >> the >> linear mod

Re: [R] Problem with aov

2009-07-22 Thread Ben Bolker
theliver wrote: > > I'm currently doing simple, one way ANOVA using R. > > I'm analyzing a count based upon an Hour value (0-23) in which it occurs. > The count varies greatly over the entire day (usually with a range of 400 > or so), but certain hour groupings could be useful for later data

Re: [R] Problem with aov

2009-07-22 Thread Ben Bolker
Oops, I mean hours15t21.data.ztl$Hour <- factor(hours15t21.data.ztl$Hour) Sorry -- View this message in context: http://www.nabble.com/Problem-with-aov-tp24613042p24615059.html Sent from the R help mailing list archive at Nabble.com. __ R-help@

Re: [R] simple lme question

2009-07-23 Thread Ben Bolker
ve already done ... (see e.g. Crawley Data Analysis in S-PLUS ...) You might want to send future queries to r-sig-mixed-mod...@r-project.org ... good luck, Ben Bolker -- View this message in context: http://www.nabble.com/simple-lme-question-tp24622668p24625867.html Sent from the R help ma

Re: [R] Automatic differentiation in R

2009-07-23 Thread Ben Bolker
a distribution in terms of shape1 and shape2, then it is "straightforward" (i.e. it would take me a while to write some non-horrible code, but I'm sure it's doable) to use the chain rule to generate a function that computes the derivatives symbolically (still not as efficient as aut

Re: [R] Updating DataFrame with Function

2009-07-24 Thread Ben Bolker
BostonR wrote: > > This should be very simple but I am wrestling with updating a data frame > from within a function. Here is a simple example: > ### SET UP DATA FRAME >> tFrame <- data.frame(T=c(1:5)) >> >> tFrame > T > 1 1 > 2 2 > 3 3 > 4 4 > 5 5 >> > # Simple function that updates w

Re: [R] str(data.frame) after subsetting reflects original structure, not subsetted structure?

2009-07-24 Thread Ben Bolker
think). subset() does not drop unused levels. If you try table(E$C) you will see that there are no "l" values left: h l 10 0 E$C <- factor(E$C) or E$C <- E$C[drop=TRUE] or library(gdata) E <- drop.levels(E) will all work. RSiteSearch("subset drop"

Re: [R] [Rd] How to create a permanent dataset in R.

2009-07-24 Thread Ben Bolker
Liviu Andronic wrote: > > (redirecting to r-help; it seems more appropriate for such a question) > Hello, > > On Fri, Jul 24, 2009 at 8:11 AM, Albert EINstEIN > wrote: >> Actually, we know that If we create a dataset in R ,after closing the >> session the dataset automatically is closed. I tri

Re: [R] suggestion for paired t-tests

2009-07-26 Thread Ben Bolker
jacktanner wrote: > > There's a funny inconsistency in how t.test handles paired=T or paired=F. > If x > and y parameters are lists, paired=F works, but paired=T doesn't. > >> lg=read.csv("my.csv") >> a = subset(lg, condition=="a")["score"] >> b = subset(lg, condition=="b")["score"] >> t.test(

Re: [R] calculating p-values from t-values for a Bonferroni adjustment

2009-07-27 Thread Ben Bolker
you have redefined the pt() function by accident? Works fine for me, e.g. > 2*(1-pt(2,10)) [1] 0.07338803 2*pt(abs(x),df,lower.tail=FALSE) would be slightly more general/accurate. Ben Bolker -- View this message in context: http://www.nabble.com/calculating-p-values-from-t-values-for-a

Re: [R] Help with significance. T-test?

2009-07-28 Thread Ben Bolker
mik07 wrote: > > Hi, > > this is more a general statistics question I think. > > I am working on a system which automatically answers user questions (such > systems are commonly called "Question Answering systems"). > I evaluated different versions of the same system on a publicly available >

Re: [R] x and y Error Bars

2009-07-31 Thread Ben Bolker
Sarah B wrote: > > Hi All, > > I have a question about plotting a one-to-one line and x-and-y error bars > on a scatterplot for my data. I just can't seem to work it out! > > > I have data from an experiment with 7 different treatment levels with 3 > replicates, that is set-out as follows: >

Re: [R] parameter asterisks

2009-08-04 Thread Ben Bolker
get the order of magnitude right) to let R know that the expected values of the parameters vary by an order of magnitude. Ben Bolker -- View this message in context: http://www.nabble.com/parameter-asterisks-tp24804823p24807838.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] no predict function in lme4 ?

2010-03-23 Thread Ben Bolker
amples/Owls.pdf http://glmm.wikidot.com/local--files/examples/Owls.Rnw for a bit of a worked example. 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] R, S, S-Plus, whence comes thy name?

2010-03-26 Thread Ben Bolker
John Sorkin grecc.umaryland.edu> writes: > How did S, S-Plus, and R get their names? From http://stat.bell-labs.com/S/ http://cm.bell-labs.com/stat/doc/94.11.ps by Rick Becker By July, 1976, we decided to name the system. Acronyms were in abundance at Bell Laboratories, so it seemed su

Re: [R] Calculate variance/covariance with complex numbers

2010-03-27 Thread Ben Bolker
Gang Chen gmail.com> writes: > > Anybody knows what functions can be used to calculate > variance/covariance with complex numbers? var and cov don't seem to > work: How about: y <- complex(real=5:1,imag=2:6) z <- complex(real=1:5,imag=6:10) complex.var <- function(x) { mx <- mean(x) n <-

Re: [R] Linear mixed models with custom link functions in R

2010-03-27 Thread Ben Bolker
Daniel Barton umontana.edu> writes: > > Hello All, > I am looking for an R library/function that allows the specification > of a custom link function in a linear mixed model. You might want to try on the r-sig-mixed-mod...@r-project.org list. I would probably call this a *G*LMM becaus

Re: [R] Calculate variance/covariance with complex numbers

2010-03-28 Thread Ben Bolker
Gang Chen gmail.com> writes: > > Thanks a lot for the help, Ben Bolker and Chuck! > > Chuck, it seems your version needs a little modification. Instead of this: > > > xri <- matrix(rnorm(1)+1i*rnorm(1),nc=2) > > crossprod(xri-colMeans(xri))/(nrow(xri)

Re: [R] Calculate variance/covariance with complex numbers

2010-03-28 Thread Ben Bolker
Rolf Turner wrote: > On 28/03/2010, at 11:50 AM, Ben Bolker wrote: > >> Gang Chen gmail.com> writes: >> >>> Anybody knows what functions can be used to calculate >>> variance/covariance with complex numbers? var and cov don't seem to >>> wor

Re: [R] Ellipse that Contains 95% of the Observed Data

2010-03-28 Thread Ben Bolker
Tom La Bone gforcecable.com> writes: > > > I can take the results of a simulation with one random variable and generate > an empirical interval that contains 95% of the observations, e.g., > > x <- rnorm(1) > quantile(x,probs=c(0.025,0.975)) > > Is there an R function that can take the re

Re: [R] interpretation of p values for highly correlated lo gistic analysis

2010-03-31 Thread Ben Bolker
claus orourke gmail.com> writes: look up "Hauck-Donner effect" ... __ 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, m

Re: [R] pvals.fnc() with language R does not work with R 2.10.1

2010-04-01 Thread Ben Bolker
sibly contacting Baayen. I suspect Bates will just tell you what I stated above. You could also look at http://glmm.wikidot.com/faq , but again it doesn't say much more than I have already stated. Ben Bolker __ R-help@r-project.org mailing list http

Re: [R] Exporting Nuopt from splus to R

2010-04-02 Thread Ben Bolker
Jp2010 yahoo.com> writes: >From my understanding it is going to be difficult, is that my understanding > right.? Probably impossible ... TIBCO, or whoever owns S-PLUS now (I don't pay much attention, so it's hard for me to keep track) does try to achieve as much R-compatibility as possible:

Re: [R] Expectation of E(x^1/2)

2010-04-10 Thread Ben Bolker
Haneef Anver yahoo.com> writes: > I am trying to find the expectation of x^1/2 where x~N(a,b) > ( Normal with mean a and variance b). > Any feedback would be highly appreciated. I have no idea at the moment how to start doing this analytically, but is this at all helpful? > mean(sqrt(comp

Re: [R] Expectation of E(x^1/2)

2010-04-10 Thread Ben Bolker
And Mathematica says In[2]:= 1/Sqrt[2 Pi] Integrate[Exp[-x^2/2] Sqrt[x],{x,0,Infinity}] 3 Gamma[-] 4 Out[2]= - 3/4 2Sqrt[Pi] (I suppose there's probably a change-of-variables trick to do this ...) in R: > gamma(3/4)/(

Re: [R] Excel date to R format

2010-04-12 Thread Ben Bolker
Gabor Grothendieck gmail.com> writes: > > See the relevant article in R News 4/1. > > On Mon, Apr 12, 2010 at 10:36 AM, ManInMoon wrote: > > > > I have a vector of double like this from Excel. > > > > 39965.0004549653 > > > > and I want to put them in R such that I can display them in any Date

Re: [R] liner regression for multiple keys

2010-04-14 Thread Ben Bolker
newbie_2010 gmail.com> writes: > a1 is the first key in input. second column is x-axis and 3rd is y-axis and > 4th is its corresponding key. > Now for every key in 1st column I would like to calculate LR that gives p > value. I tried to manage with a single key. But my problem is that How could >

Re: [R] curve

2010-04-14 Thread Ben Bolker
Dwayne Blind gmail.com> writes: > How can I use "curve" with a function of two variables ? see "curve3d" in the emdbook package. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

Re: [R] bwplot puts the bars in the wrong place

2010-04-17 Thread Ben Bolker
James Rome gmail.com> writes: > ... does the call automatically assume that the variable > names are from the frame in the data= statement? Yes, it does. How about bwplot(tt~factor(OnHour,levels=0:23)|Runway,data=gdf, drop.unused.levels=FALSE) ? __

Re: [R] interpreting acf plot

2010-04-17 Thread Ben Bolker
Giovanni Azua gmail.com> writes: > > Hello, > > I am attending a course in Computational Statistics at > ETH and in one of the assignments I am asked to prove > that a time series is not autocorrelated using the R function "acf". > > I tried out the acf function with the given data, > accord

Re: [R] Tinn-R

2010-04-19 Thread Ben Bolker
, sep=''), c('', 'search.txt', 'objects.txt','file.r', 'selection.r','block.r','lines.r'), sep='') into Tinn-R makes it work (for that Tinn-R session). There

Re: [R] QCA3 segfault

2010-04-20 Thread Ben Bolker
ded0rg finghall1.plus.com> writes: > I have just dwonloaded QCA3 onto this machine (ubuntu, karmic, amd64) and a > mac. The examples run fine on teh mac, but crashed R on ubuntu. Any help > much apprecia\ted. > You should probably contact the package maintainer (see help(package="QCA3")).

Re: [R] Struggling with two questions : Newbie student .

2010-04-25 Thread Ben Bolker
malcolm Crouch gmail.com> writes: > 1. Tests for indications of asbestos in the lungs of employees at an > insulation manufacturer resulted in four persons with positive indications > of asbestos being sent to a medical center for further testing . if 45% of > the employees have positive indicati

Re: [R] Unexpected warnings from summary() on mcmc.list objects

2010-04-26 Thread Ben Bolker
Chris Fonnesbeck gmail.com> writes: > > I am trying to get summary statistics from WinBUGS/JAGS output in the > form of mcmc.list objects, using the summary() function. However, I > get odd warning messages: > > Warning messages: > 1: In glm.fit(x = X, y = Y, weights = weights, start = start, e

Re: [R] NLS "Singular Gradient" Error

2010-04-28 Thread Ben Bolker
dling time, and T is the > > experimental period. > > > > My script is as follows; > > > > model<-nls(Ne~No*(1-exp(a*(b*Ne-T))),start=list(a=1.2,b=0.015,T=24)) Are you trying to fit the Rogers random predator equation? This can't be estimated by standard meth

Re: [R] NLS "Singular Gradient" Error

2010-04-28 Thread Ben Bolker
2001) on Functional Responses. > > > > I have tried calling T<-24 and rerunning with no success sadly. You should really try the methods I suggested ... you can get a closed-form expression for the number eaten as a function of the other parameters using the Lambert W function. I

Re: [R] NLS &quot;Singular Gradient&quot; Error

2010-04-28 Thread Ben Bolker
Ben Bolker ufl.edu> writes: > You should really try the methods I suggested ... you can get > a closed-form expression for the number eaten as a function of the > other parameters using the Lambert W function. I don't think what > you're doing (with Ne on both sides

Re: [R] NLS &quot;Singular Gradient&quot; Error

2010-04-28 Thread Ben Bolker
bsnrh leeds.ac.uk> writes: > > > Hi Ben, > > Your book refers to the mle function in the emdbookx package. I was > wondering if it's possible to find that package on the internet? > > Many thanks, > Neal If the (draft) PDF says that, it's an error. See the mle2 function in the bbmle pack

Re: [R] convert Factor as numeric

2010-04-29 Thread Ben Bolker
arnaud Gaboury gmail.com> writes: > > Dear group, > > I know this issue has been already covered, and before you reply I must say > I have read the R-FAQ and search the mailing list archive. > I still can't manage to change my factor to numeric as I couldn't find any > clear answer. (Posting v

Re: [R] Something similar to loess for 2D curves?

2010-04-30 Thread Ben Bolker
also be some > (very few) obvious outliers in the data. thin-plate or tensor product splines in package mgcv? 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.

Re: [R] How to estimate the residual SD for each sample separately in mixed-effects model?

2010-04-30 Thread Ben Bolker
ve poked through various materials (esp. Pinheiro and Bates 2000) and not been able yet to figure out how to do this -- hopefully there is some simple trick I'm missing. * Questions on mixed models are best addressed to the mixed models special-interest mailing list, r-sig-mixed-mod...@r-p

Re: [R] Calculation error

2010-05-02 Thread Ben Bolker
ly a bad idea. Reading R FAQ 7.31 might be useful as well. May I respectfully suggest that you not use a system that you don't understand to compute the dosages of highly toxic drugs ? 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] Overview of error and warning messages for teaching + examples

2009-09-30 Thread Ben Bolker
Tal Galili gmail.com> writes: > > Hi Joris, > > Good luck with your work. > > I know how to set up a wiki. But I wouldn't do it for just 1 page. And also, > if you have little experience with it - I am not sure you would find it easy > to "jump" into it. > I'll have a look around to see what o

Re: [R] Huge matrix: allocation works but assignment fails

2009-10-01 Thread Ben Bolker
> Remi wrote: > > > (Failed to allocate a vector of size...) > > What can I do? And, maybe even more important, how can one explains such > > a behavior? If your matrices are not sparse, get more memory. If they are, help("sparseMatrix",package=Matrix) ?

Re: [R] GLM quasipoisson error

2009-10-05 Thread Ben Bolker
atorso wrote: > > Hello, > > I'm having an error when trying to fit the next GLM: > >>>model<-glm(response ~ CLONE_M + CLONE_F + HATCHING > +(CLONE_M*CLONE_F) + (CLONE_M*HATCHING) + (CLONE_F*HATCHING) + > (CLONE_M*CLONE_F*HATCHING), family=quasipoisson) >>> anova(model, test="Chi") > >>Error

Re: [R] mle from stats4

2009-10-06 Thread Ben Bolker
Stephen Collins-6 wrote: > > I am using mle as a wrapper from optim( ). How would I extract the > convergence code, to know that optim( ) converged properly? > > library(stats4) example(mle) slotNames(fit1) f...@details f...@details$convergence -- View this message in context: http://

Re: [R] 2 questions about mle() /optim() function in stats4

2009-10-07 Thread Ben Bolker
Muhtar Osman wrote: > > Dear All, > > There are two things about mle() that I wasn't so sure. > > 1) can mle() handle vector based parameter? say > ll<-function(theta=rep(1,20)){..} >I tried such function, it worked for "optim" but not for "mle". > No. mle2, in the bbml

Re: [R] modifications of out-of-the-function variable

2009-10-08 Thread Ben Bolker
devol wrote: > > Dear all, > > could you please advice whether it is possible somehow to modify an > external (from the point of some function view) variable by some > function-internal operators. For example > >> var=1 >> foo<-function(var){var=var+1} >> foo(var) >> var > [1] 1 > > but th

Re: [R] Adapt function

2009-10-08 Thread Ben Bolker
Doran, Harold wrote: > > I am trying to use the adapt function in the package adapt. To make sure > I am using it correctly, I am trying a toy example that should yield a > result of 2/3. > > Suppose the function is f(x,y) = x*y^2 and I want to integrate over f as > > Int_0^1 Int_0^2 x*y^2 dx

Re: [R] Nelder-Mead with output of simplex vertices

2009-10-10 Thread Ben Bolker
I have a pure-R implementation of the N-M simplex translated from the C code in Press et al 1994 (Numerical Recipes), instrumented to save the progress. Since I'm not sure of the copyright status (NR's code does not allow redistribution, but this is a translation ...) I'll send it in separate

Re: [R] How do I reverse the digits of a number

2009-10-10 Thread Ben Bolker
tom_p wrote: > > Hi All, > > Thanks for your help. I need to reverse the digits of a number (unknown > lenght). Example 1234->4321 > > Tom > > z <- 4321 > as.numeric(paste(rev(strsplit(as.character(z),"")[[1]]),collapse="")) [1] 1234 -- View this message in context: http://www.nabble.

Re: [R] Function Help

2009-10-11 Thread Ben Bolker
cls59 wrote: > > > > jimdare wrote: >> >> Hi there, >> >> I have created the function below: >> >> pirate<-function(x){ >> a<-x-1; b<-a/5; c<-a-b; >> d<-c-1; e<-d/5; f<-d-e; >> g<-f-1; h<-g/5; i<-g-h; >> j<-i-1; k<-j/5; l<-j-k; >> m<-l-1; n<-m/5; o<-m-n; >> final<-o/5; >> >> final >> } >>

Re: [R] Introduction to mark-recapture analysis in R?

2009-10-13 Thread Ben Bolker
oops, library("sos") after install.packages("sos") and before findFn("mark-recapture") ... -- View this message in context: http://www.nabble.com/Introduction-to-mark-recapture-analysis-in-R--tp25871729p25872847.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Introduction to mark-recapture analysis in R?

2009-10-13 Thread Ben Bolker
Anne Link wrote: > > Normal021falsefalse > false > MicrosoftInternetExplorer4 > > > Dear R-helpers, >

Re: [R] Nelder-Mead with output of simplex vertices

2009-10-13 Thread Ben Bolker
;>>> Terry T. >>> >>> That's neat and simple! It hadn't occurred to me. Thanks! >>> Ted. >> >> And, 10 seconds after posting, I realised why it hadn't -- there >> would be no visible association between the vertex and the simplex >&g

Re: [R] R neophyte question.

2009-10-14 Thread Ben Bolker
Katie Miller gmail.com> writes: > > Hi all, > > I'm currently working through the "Beginner's Guide to R" (Zurr et al.) and > I'm wondering about the first exercise in chapter 3: > [snip] > I don't know how to obtain the answers for 'Which country has had the most > cases?', 'Which country

Re: [R] When modeling with negbin from the aod package...

2009-10-14 Thread Ben Bolker
alexander russell gmail.com> writes: > > Hi, > When modeling with negbin from the aod package, parameters for a given count > > y | lambda~Poisson(lambda) > > with lambda following a Gamma distribution Gamma(r, theta) > > are estimated. > The intercept is called phi. > Some other parameters m

Re: [R] plotting/examining residuals of a mixed generalised linear model

2009-10-15 Thread Ben Bolker
kath_oreilly wrote: > > Dear R users, > > I'm hoping that more experienced users will be able to assist me in > examining the model fit of a mixed generalised linear model. The example > using the data 'bacteria' within the MASS package will hopefully > illustrate what I would like to acheive;

Re: [R] "negative length vectors are not allowed" in wilcox.exact() and perm.test()

2009-10-16 Thread Ben Bolker
David Croll wrote: > > I want to compare two datasets and I get the message > > Error in .Call("cpermdist2", ma = as.integer(m), mb = as.integer(col), : > negative length vectors are not allowed > > after specifying the exact test. I'm using the exactRankTests package. Do > you suggest me

Re: [R] Test model for singular gradient matrix

2009-10-16 Thread Ben Bolker
dmhultst wrote: > > > Hello, > > I am working with a real-time hydrologic modeling system, and I am using R > (R batch script on Linux) to create a non-linear relationship > (exponential) > between observed data. I want to extract the non-linear coefficients (“b” > and “m”) if the relationsh

Re: [R] How odds ratio is computed in fisher.test()?

2009-10-16 Thread Ben Bolker
From ?fisher.test: estimate: an estimate of the odds ratio. Note that the _conditional_ Maximum Likelihood Estimate (MLE) rather than the unconditional MLE (the sample odds ratio) is used. Only present in the 2 by 2 case. from fisher.test: mle <- function(

Re: [R] Matrixes as data

2009-10-16 Thread Ben Bolker
Magnus Torfason-2 wrote: > > > Hola! > > > > I am working on a problem where data points are (square) matrices. Is > > there a way to make a "vector" of matrices, such that it can be stored > > in a data.frame? > > I agree with previous posters that in most cases, you would want to > sto

Re: [R] Beveridge-Nelson decomposition

2009-10-16 Thread Ben Bolker
sdlywjl666 wrote: > > Dear all, > Is there some function in R to carry out Beveridge-Nelson > decomposition? > Is there some function in R to carry out seasonal adjustments of time > series? > Is there some function in R to carry out x11 or x12 seasonal adjustments ? > > RSiteSearch("Bev

Re: [R] length error using tapply()

2009-10-16 Thread Ben Bolker
George Aldridge wrote: > > I am new to R and trying to aggregate a character variable. I have > searched, and tapply() seems to hold the best hope, but I am having > trouble with it. I have a character variable 'hab' and 3 factors all of > the same length: > >> length(hab) > [1] 105219 >> leng

Re: [R] looking for reference that covers convergence in distribution

2009-10-17 Thread Ben Bolker
Peng Yu wrote: > > I am looking for a good probability book that describes convergence in > distribution. I have looked through Introduction to Probability by > Charles M. Grinstead, J. Laurie Snell, but I don't find any formal > description on convergence in distribution. Could somebody recomm

Re: [R] re peating values in levels()

2009-10-17 Thread Ben Bolker
Donald Braman wrote: > > Can someone help me understand this results? > >> levels(as.factor(miset1$facts_convict)) > [1] "1" "1" "2" "3" "4" "5" "6" > > converting to numeric and back doesn't seem to help: > >> levels(as.factor(as.numeric(miset1$facts_convict))) > [1] "1" "1" "2" "3" "4" "5"

Re: [R] looking for reference that covers convergence in distribution

2009-10-18 Thread Ben Bolker
Peng Yu wrote: > > On Sat, Oct 17, 2009 at 3:28 PM, Peter Dalgaard > wrote: >> Ben Bolker wrote: >>> >>> >>> Peng Yu wrote: >>>> >>>> I am looking for a good probability book that describes convergence in >>>> dis

Re: [R] Why points() is defined specially for a 1 by 2 matrix?

2009-10-18 Thread Ben Bolker
Peng Yu wrote: > > On Sun, Oct 18, 2009 at 10:26 PM, Richard M. Heiberger > wrote: >>> points(x[4,],pch=2)# this is plotted as two points >> >> drops what it sees as an unnecessary dimension. >> >> Use >> >>> points(x[4,, drop=FALSE], pch=2) >> >> See FAQ 7.5 >> >> tmp <- matrix(1:2) >> tmp >>

Re: [R] Bayesian regression stepwise function?

2009-10-22 Thread Ben Bolker
Allan.Y wrote: > > Hi everyone, > > I am wondering if there exists a stepwise regression function for the > Bayesian regression model. I tried googling, but I couldn't find > anything. I know "step" function exists for regular stepwise regression, > but nothing for Bayes. > Why? That seem

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