Your response variable is not binomial, it's a proportion.
Try the betareg function in the betareg package, which more correctly assumes
that your response variable is Beta distributed (but beware that 1 and 0 are
not allowed). The syntax is the same as in a glm.
HTH
Ruben
-Mensaje
You have a conceptual problem, as pointed out by previous helpers.
You don't have a standard error for the first level of your categorical
variable because that level's effect is not estimated.
It is being used as a reference level against which the other levels of that
categorical variable are
deltamethod function in package msm may help (but bear in mind the
warnings/admonitions/recommendations of other helpers)
HTH
Rubén
--
Rubén H. Roa-Ureta, Ph. D.
AZTI Tecnalia, Txatxarramendi Ugartea z/g,
Sukarrieta, Bizkaia, SPAIN
-Original Message-
From:
Read optimx's help.
There are 'method', 'upper', 'lower' arguments that'll let you put bounds on
pars.
HTH
Rubén
-Mensaje original-
De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] En
nombre de FU-WEN LIANG
Enviado el: jueves, 09 de febrero de 2012 23:56
Para:
-Mensaje original-
De: Bert Gunter [mailto:gunter.ber...@gene.com]
Enviado el: jueves, 26 de enero de 2012 21:20
Para: Rubén Roa
CC: Ben Bolker; Frank Harrell
Asunto: Re: [R] How do I compare 47 GLM models with 1 to 5 interactions and
unique combinations?
On Wed, Jan 25, 2012 at 11:39
of freedom tests)
Ruben: It does.
5. parsimony is good
Ruben: It is.
None of these assumptions is true. Model selection without shrinkage
(penalization) seems to offer benefits but this is largely a mirage.
Ruben: Have a good weekend!
Ruben
Rubén Roa wrote
-Mensaje original-
De: Bert
A more 'manual' way to do it is this.
If you have all your models named properly and well organized, say Model1,
Model2, ..., Model 47, with a slot with the AIC (glm produces a list with one
component named 'aic') then something like this:
x - matrix(0,1081,3)
x[,1:2] - t(combn(47,2))
for(i in
-project.org] En
nombre de Ben Bolker
Enviado el: miércoles, 25 de enero de 2012 15:41
Para: r-h...@stat.math.ethz.ch
Asunto: Re: [R]How do I compare 47 GLM models with 1 to 5 interactions and
unique combinations?
Rubén Roa rroa at azti.es writes:
A more 'manual' way to do it is this.
If you have
René,
Yes, to fit a re-parameterized logistic model I think you'd have to code the
whole enchilada yourself, not relying on glm (but not nls() as nls() deals with
least squares minimization whereas here we want to minimize a minus log
binomial likelihood).
I did that and have the
Assuming a logistic model, for each group solve for d at Y=0, or solve for d at
p=0.5, where d is your continuous predictor, Y is the logit score, and p is the
probability of success in the binomial model. After that you can get the
standard error of the inflection point by Taylor series (aka
De: Rubén Roa
Enviado el: jueves, 17 de noviembre de 2011 9:53
Para: 'us...@admb-project.org'
Asunto: Reporting a conflict between ADMB and Rtools on Windows systems
Hi,
I have to work under Windows, it's a company policy.
I've just found that there is a conflict between tools used
Thanks Gabor and Jan.
The batch files solution seems the way to go.
Will implement it!
Rubén
-Mensaje original-
De: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Enviado el: jueves, 17 de noviembre de 2011 13:58
Para: Rubén Roa
CC: r-help@r-project.org
Asunto: Re: [R] RV
-Original Message-
From: r-help-boun...@r-project.org on behalf of yehengxin
Sent: Sat 10/1/2011 8:12 AM
To: r-help@r-project.org
Subject: [R] Poor performance of Optim
I used to consider using R and Optim to replace my commercial packages:
Gauss and Matlab. But it turns out that Optim
-Original Message-
From: r-help-boun...@r-project.org on behalf of YuHong
Sent: Sun 10/2/2011 3:27 AM
To: r-help@r-project.org
Subject: [R] Can I tell about someone's academic cheating
Hello,
Can I tell about someone¡¦s academic cheating behavior in the mailing list?
For I knew this
Check one of the examples in
?try
It has this heading:
## run a simulation, keep only the results that worked.
If your system is Windows, you can also try to increase the memory available
for one application, in order to avoid the problem.
Do a search for 3GB switch
HTH
Dr. Ruben H.
Yes, on a recent heavy-duty job -profile likelihood of Tweedie power parameter
for a relatively complex glm with hundreds of thousands rows dataframe- I had
the cannot allocate vector ... error, then I just closed-saved the main
workspace, full of large objects, then I did the profiling on a
z/g, 48395, Sukarrieta,
Bizkaia, Spain
-Mensaje original-
De: John C Nash [mailto:nas...@uottawa.ca]
Enviado el: domingo, 04 de septiembre de 2011 18:55
Para: Ravi Varadhan
CC: Rubén Roa; 'kathryn.lord2...@gmail.com'; 'r-help@r-project.org'
Asunto: Re: Gradients in optimx
I've started
Hi,
In my package CatDyn, which uses optimx, I included the gradients of 20 version
of the model involved.
I estimate model parameters with numerical gradients, and at the final
estimates I calculate the analytical gradients.
In the simplest version of the model the analytical gradients
Dear Ewan,
I faced this problem and solved it by contacting the package authors, John
Schnute and Rowan Haigh, rowan.ha...@dfo-mpo.gc.ca.
Here is a function that solves the problem by displacing the Greenwich meridian
to longitude 348 leaving Ireland to the right.
This longitude does not span
Dear ComRades,
Package CatDyn 1.0-3 is now available on CRAN.
The package allows the estimation of the absolute abundance of a wild
population during a capture season using a nonlinear and recursive
discrete-time structural model.
The response variable is the catch, assumed a random variable
I know how to do what you want. However, the fact that you didn't bother to
follow the rules of the list eliminates the initial, admittedly faint,
enthusiasm to help you. Maybe someone else will guide you anyways.
The rules are extremely simple. Read them at the end of this message. If you do
The problem is not that you are new to R. This is a conceptual issue.
Let y be the response variable and let {x_i} be a set of predictors. Your first
model (identity response and log-link) is saying that
y=f(x_1)f(x_2)...f(x_n) + e, e~Normal(0,sigma)
i.e. this is an additive observation-error
Funny, I was going to quote your paper with Dichmont in Fisheries Research
regarding this, then I forgot to do it, but you yourself came out and posted
the explanation.
This forum is great!
Rubén
-Original Message-
From: r-help-boun...@r-project.org on behalf of
) and the data (the points).
Optimise.
Re-plot.
Plot a residual histogram.
Plot a residual scatterplot.
Plot a Q-Q residual plot.
HTH
Rubén
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi
Check the PBSModelling package.
HTH
Rubén
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
-Mensaje original-
De: r-help
of estimating nolinear models.
HTH
Rubén
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
-Mensaje original-
De: r-help-boun...@r
-Mensaje original-
De: Peter Ehlers [mailto:ehl...@ucalgary.ca]
Enviado el: jueves, 31 de marzo de 2011 18:09
Para: Rubén Roa
CC: r-help@r-project.org
Asunto: Re: [R] Simple lattice question
On 2011-03-31 06:58, Rubén Roa wrote:
Thanks Peters!
Just a few minor glitches now
,col='black',type='b')
How do I put a legend for the grouping variable in the empty upper-right panel?
TIA
Rubén
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395
,
and,
would like to add a title to the legend. Such as 'main' for plots.
Any suggestions?
Rubén
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
...
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
-Mensaje original-
De: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] En nombre de Frank Harrell
are interested read the full article here:
http://www.sciencemag.org/content/331/6018/698.full
Rubén
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta
-Mensaje original-
De: Kjetil Halvorsen [mailto:kjetilbrinchmannhalvor...@gmail.com]
Enviado el: jueves, 17 de marzo de 2011 16:19
Para: Rubén Roa
CC: Alexx Hardt; r-help@r-project.org
Asunto: Re: [R] R² for non-linear model
see inline.
On Thu, Mar 17, 2011 at 4:58 AM, Rubén
Hi Alexx,
I don't see any problem in comparing models based on different distributions
for the same data using the AIC, as long as they have a different number of
parameters and all the constants are included.
For example, you can compare distribution mixture models with different number
of
In addition to David's suggestion, you might want to examine the termplot
function,
?termplot
HTH
-Original Message-
From: r-help-boun...@r-project.org on behalf of David Winsemius
Sent: Sat 11/20/2010 3:54 PM
To: Sonja Klein
Cc: r-help@r-project.org
Subject: Re: [R] How to produce glm
.
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
-Mensaje original-
De: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] En
x - data.frame(x=1:10)
require(gtools)
x$y - ifelse(odd(x$x),0,1)
HTH
R.
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
-Mensaje
Hi,
Probably Windows cann't allocate enough contiguous free space.
Try this:
Find boot.ini (usually at the root c:\)
Without changing anything else, add this line at the end of the script:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=Microsoft Windows XP Professional
3GB /3GB /noexecute=optin
If your problem was as you described it, you'd simply find the 1st derivative
of your eq. w.r.t. k, equate to 0, and then solve for k (and check that the
solution is a maximum). But I guess what you really want to do is to estimate k
from data given your equation and _another model_ for the
Questions about geoR should be directed to R-SIG-GEO.
Anyway, you should provide more info about your problem.
Read the Posting Guide.
Have you tried changing the model? Sometimes falling back from Matern to
exponential or Gaussian allows successful convergence.
HTH
Rubén
series (aka Delta method) using the standard errors of coef[1],
coef[2] and their correlation.
HTH
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia
Ravi Varadhan's post Re: optim() not finding optimal
values the 27th of June.
HTH
Rubén
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
at the start,
in your function, to reduce the dimensionality of your profile likelihood
approximation thus helping the optimizer.
HTH
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
-Mensaje original-
De: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de]
Enviado el: lunes, 21 de junio
, for
example:
library(Formula)
Error in get(Info[i, 1], envir = env) :
internal error -3 in R_decompress1
Error: package/namespace load failed for 'Formula'
Any hints?
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine
De: Chris Gast [mailto:cmg...@gmail.com]
Enviado el: jueves, 17 de junio de 2010 22:32
Para: Rubén Roa
CC: r-help@r-project.org; us...@admb-project.org
Asunto: Re: [ADMB Users] an alternative to R for nonlinear stat models
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
,
ozan
Use text,
df - data.frame(year=c(2001,2002,2003),a=c(8,9,7),b=c(100,90,95))
df
plot(b~a,data=df,ylim=c(.98*min(b),1.02*max(b)))
text(x=df$a,y=df$b-.01*max(df$b),lab=format(df$year))
Dr. Rubén Roa-Ureta
multi-par restrictions)
as a single parameter.
Wait, is this a homework?
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
date
df$Year - as.numeric(format(df$date, %Y))#Year
df$Month - as.numeric(format(df$date, %m))#Month
df$Week - as.numeric(format(df$date, %W)) +1 #Week
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine
how to set up the list of parameter 'what' to read the
headers of 'y'. In the above the only columns read are those indicated by a '0'.
HTH
Ruben
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
/msg34548.html
HTH
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
Only a man of Worth sees
.
Thanks.
---
Hi,
Would you like me to remove you?
Rubén
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
, not the
binomial, which is for counts.
If you are modeling a proportion try the betareg function in betareg package.
HTH
Ruben
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395
-Mensaje original-
De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] En
nombre de Martin Batholdy
Enviado el: lunes, 22 de marzo de 2010 15:53
Para: r help
Asunto: [R] add information above bars of a barplot()
hi,
I have a barplot with six clusters of four bars
. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
__
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
instead of the call to the temporary file? I guess it is a Tinn-R issue
Thanks
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
I doubt it. Guess why?
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN
-Mensaje original-
De: r-help-boun...@r-project.org
From what distribution?
If the uniform,
runif(100,0,2*pi)
If another, install package Runuran, and do this
?Runuran
Vignette(Runuran)
HTH
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
examples in demo(plotmath) do not include this.
I've tried a few things to no avail and I did an RSiteSearch(superscript
delimiter) with zero results.
Thx
Rubén
Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine
Beatriz Yannicelli wrote:
Dear all:
Is it possible to conduct a discriminant analysis in R with categorical and
continuous variables as predictors?
Beatriz
Beatriz,
Simply doing this in the R console:
RSiteSearch(discriminant)
yields many promising links. In particular, check documentation
_nico_ wrote:
Hello everyone,
I'm trying to use mle from package stats4 to fit a bi/multi-modal
distribution to some data, but I have some problems with it.
Here's what I'm doing (for a bimodal distribution):
# Build some fake binormally distributed data, the procedure fails also with
real
Zaslavsky, Alan M. wrote:
This article is accompanied by nice pictures of Robert and Ross.
Data Analysts Captivated by Power of R
http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html
Thanks for the heads up. The R morale is going through the roof!
I've given
dave fournier wrote:
Hi All,
Following Mike Praeger's posting on this list,
I'm happy to pass on that AD Model Builder is now freely available from
the ADMB Foundation.
http://admb-foundation.org/
Two areas where AD Model builder would be especially useful to R users
are multi-parmater
Greg Snow wrote:
Sarah,
Doing:
RSiteSearch('gompertz', restrict='functions')
At the command prompt gives several promising results.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
And you can also do:
nobs - length(data$salam.size.observed)
fn-function(p){
Mike Lawrence wrote:
On Sat, Nov 8, 2008 at 3:59 PM, Rubén Roa-Ureta [EMAIL PROTECTED] wrote:
...
The fit is for grouped data.
...
As illustrated in my example code, I'm not dealing with data that can be
grouped (x is a continuous random variable).
Four points:
1) I've showed
Mike Lawrence wrote:
Hi all,
Where f(x) is a logistic function, I have data that follow:
g(x) = f(x)*.5 + .5
How would you suggest I modify the standard glm(..., family='binomial')
function to fit this? Here's an example of a clearly ill-advised attempt to
simply use the standard glm(...,
Jon A wrote:
Hello,
I have a dataset with a continuous independent variable (fish length, range:
30-150 mm) and a binary response (foraging success, 0 or 1). I want to
discretize fish length into 5 mm bins and give the proportion of individuals
who successfully foraged in each each size bin. I
Rubén Roa-Ureta wrote:
Jon A wrote:
Hello,
I have a dataset with a continuous independent variable (fish length,
range:
30-150 mm) and a binary response (foraging success, 0 or 1). I want to
discretize fish length into 5 mm bins and give the proportion of
individuals
who successfully foraged
Igor Telezhinsky wrote:
Dear all,
I have recently found out about the R project. Could anyone tell me if it is
possible to make the comparison of two distributions using R packages? The
problem is TRICKY because I have the distributions of measurements and each
measurement in the given
Jordi Garcia wrote:
Good morning,
I am using R to try to model the proportion of burned area in
Portugal. The dependent variable is the proportion. The family used is
binomial and the epsilon would be binary.
I am not able to find the package to be used when the proportion (%)
has to be
drbn wrote:
Hello,
I have seen that some papers do this:
1.) Group data by year (e.g. 35 years)
2.) Estimate the mean of the key variable through the distribution that fits
better (some years is a normal distribution , others is a more skewed, gamma
distribution, etc.)
3.) With these
leo_wa wrote:
i want to plot the histogram and the curve in the same graph.if i have a set
of data ,i plot the histogram and also want to see what distribution it
was.So i want to plot the curve to know what distribution it like.
To draw the curve and the distribution you should have an
leo_wa wrote:
In the previous post ,i ask how to plot the normal curve and the histogram
in the same graph.if i want to know how to plot the chi square distribution
to campare the data set ,how can i do that?
You should make up your mind, is your random variable X (-inf,+inf) or
Sum(X^2)
Jörg Groß wrote:
Hi,
Is there a way to simulate a population with R and pull out m samples,
each with n values
for calculating m means?
I need that kind of data to plot a graphic, demonstrating the central
limit theorem
and I don't know how to begin.
So, perhaps someone can give me some
Prasanth wrote:
Dear All:
Greetings!
By the way, is it possible to have a graph (say line graph) that shows
values as well (say y-axis values within the graph)? One could do it in
excel. I am just wondering whether it is possible with R!
x - rnorm(100,2,3)
y - rnorm(100,2,3)
Daniela Garavaglia wrote:
Sorry, I have some troubles with the graph device.
How can I draw a function over a histogram?
Thank's so much.
Daniela,
What function?
Here is one example using density() and using dnorm()
x - rnorm(1000,2,2)
hist(x,prob=TRUE)
lines(density(x,na.rm=TRUE),col=red)
imicola wrote:
Sorry, this is probably quite an easy question, but I'm new to R and couldn't
find the answer anywhere.
I'm using geoR and geoRglm, but can't figure out how to get a border in my
geodata object. Does this need to be defined when I'm importing my data, or
afterwards, and how do I
Mzabalazo Ngwenya wrote:
Hi everyone !
I'm am trying to fit a kriging model to a set of data. When I just run
the likfit command I can obtain the results. However when I try to
pass additional arguements to the optimization function optim I get
errors. That is I want to obtain the hessian
Richard Pearson wrote:
?rm
Richard
Ralf Goertz wrote:
How can I automatically exclude one variable from being saved in the
workspace when I quit an R session? The problem is I don't know how to
erase a variable once it has been created.
[...]
Ralf
More on the use of rm. If you want
[EMAIL PROTECTED] wrote:
Given a data set and a set of predictors and a response in the data,
we would like to find a model that fits the data set best.
Suppose that we do not know what kind of model (linear, polynomial
regression,... ) might be good, we are wondering if there is R-package(s)
andrea previtali wrote:
Hi,
I need to analyze the influences of several factors on a variable that is a
measure of fecundity, consisting of 73 observations ranging from 0 to 5. The
variable is continuous and highly positive skewed, none of the typical
transformations was able to normalize
Antonio Olinto wrote:
Hello,
I'm analyzing some fish length-frequency data to access relative age and
growth
information and I would like to do something different from FiSAT / ELEFAN
analysis.
I found a package named MIX in http://www.math.mcmaster.ca/peter/mix/mix.html
but it's
because there they have
implemented a correlation term, so that you can identify typical spatial
correlation functions such as Gauss and exponential, particular cases of
the Matern family.
Rubén
Roa-Ureta, R. and E.N. Niklitschek (2007) Biomass estimation from
surveys with likelihood-based
[EMAIL PROTECTED] wrote:
I'd like to compare length-weight regressions among years. Any information
would be appreciated.
a. gray
fisheries consultant
Your message is rather cryptic for a general statistical audience,
whereas I'm sure in a fisheries group everybody would understand what
BEP wrote:
Hello all,
I am working with a very large data set into R, and I have no interest in
reviving my SAS skills. To do this, I will need to drop unwanted variables
given the size of the data file. The most common strategy seems to be
subsetting the data after it is read into R.
85 matches
Mail list logo