Re: [R] regression with proportion data

2012-03-19 Thread Rubén Roa
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

Re: [R] Standard errors GLM

2012-03-13 Thread Rubén Roa
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

Re: [R] Calculation of standard error for a function

2012-03-03 Thread Rubén Roa
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:

Re: [R] Constraint on one of parameters.

2012-02-09 Thread Rubén Roa
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:

Re: [R] How do I compare 47 GLM models with 1 to 5 interactions and unique combinations?

2012-01-27 Thread Rubén Roa
-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

Re: [R] How do I compare 47 GLM models with 1 to 5 interactions and unique combinations?

2012-01-27 Thread Rubén Roa
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

Re: [R] How do I compare 47 GLM models with 1 to 5 interactions and unique combinations?

2012-01-25 Thread Rubén Roa
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

Re: [R] How do I compare 47 GLM models with 1 to 5 interactions and unique combinations?

2012-01-25 Thread Rubén Roa
-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

Re: [R] how to get inflection point in binomial glm

2011-12-02 Thread Rubén Roa
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

Re: [R] how to get inflection point in binomial glm

2011-12-01 Thread Rubén Roa
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

[R] RV: Reporting a conflict between ADMB and Rtools on Windows systems

2011-11-17 Thread Rubén Roa
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

Re: [R] RV: Reporting a conflict between ADMB and Rtools on Windows systems

2011-11-17 Thread Rubén Roa
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

Re: [R] Poor performance of Optim

2011-10-01 Thread Rubén Roa
-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

Re: [R] Can I tell about someone's academic cheating

2011-10-01 Thread Rubén Roa
-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

Re: [R] Cannot allocate vector of size x

2011-09-21 Thread Rubén Roa
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.

Re: [R] Cannot allocate vector of size x

2011-09-21 Thread Rubén Roa
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

Re: [R] Gradients in optimx

2011-09-05 Thread Rubén Roa
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

Re: [R] gradient function in OPTIMX

2011-08-30 Thread Rubén Roa
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

Re: [R] PBSmapping, where is Ireland?!

2011-08-17 Thread Rubén Roa
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

[R] [R-pkgs] CatDyn - Estimation of wild populations abundance

2011-07-28 Thread Rubén Roa
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

Re: [R] How to find the likelihood of a null model in R

2011-07-25 Thread Rubén Roa
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

Re: [R] please help! what are the different using log-link function and log transformation?

2011-06-19 Thread Rubén Roa
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

Re: [R] please help! what are the different using log-link function and log transformation?

2011-06-19 Thread Rubén Roa
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

Re: [R] logistic growth model

2011-06-06 Thread Rubén Roa
) 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

Re: [R] Building Custom GUIs for R

2011-05-20 Thread Rubén Roa
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

Re: [R] nls problem with R

2011-05-04 Thread Rubén Roa
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

Re: [R] Simple lattice question

2011-04-01 Thread Rubén Roa
-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

[R] Simple lattice question

2011-03-31 Thread Rubén Roa
,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

Re: [R] Simple lattice question

2011-03-31 Thread Rubén Roa
, 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

Re: [R] Degrees of freedom for lm in logLik and AIC

2011-03-28 Thread Rubén Roa
... 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

[R] R helps win competitions

2011-03-23 Thread Rubén Roa
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

Re: [R] R² for non-linear model

2011-03-18 Thread Rubén Roa
-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

Re: [R] R² for non-linear model

2011-03-17 Thread Rubén Roa
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

Re: [R] How to produce glm graph

2010-11-21 Thread Rubén Roa
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

Re: [R] 0.3 is not 0.3, bug in seq() function?

2010-10-28 Thread Rubén Roa
. 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

Re: [R] Set value if else...

2010-10-15 Thread Rubén Roa
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

Re: [R] Memory limit problem

2010-10-12 Thread Rubén Roa
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

Re: [R] [Fwd: RE: maximum likelihood problem]

2010-10-02 Thread Rubén Roa
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

Re: [R] geoR - likfit failure

2010-08-04 Thread Rubén Roa
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

Re: [R] ed50

2010-07-13 Thread Rubén Roa
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

Re: [R] selection of optim parameters

2010-07-06 Thread Rubén Roa
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

Re: [R] optim() not finding optimal values

2010-06-28 Thread Rubén Roa
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

Re: [R] Problem with package installation

2010-06-23 Thread Rubén Roa
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

[R] Problem with package installation

2010-06-21 Thread Rubén Roa
, 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

Re: [R] [ADMB Users] an alternative to R for nonlinear stat models

2010-06-18 Thread Rubén Roa
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

Re: [R] [ADMB Users] an alternative to R for nonlinear stat models

2010-06-17 Thread Rubén Roa
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

Re: [R] adding year information to a scatter plot

2010-05-03 Thread Rubén Roa
, 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

Re: [R] non linear estimation

2010-04-29 Thread Rubén Roa
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

Re: [R] Converting daily data series to monthly series

2010-04-20 Thread Rubén Roa
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

Re: [R] Scanning only specific columns into R from a VERY large file

2010-04-19 Thread Rubén Roa
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

Re: [R] Truncated Normal Distribution and Truncated Pareto distribution

2010-04-19 Thread Rubén Roa
/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

Re: [R] remove from the R mailing list

2010-03-30 Thread Rubén Roa
. 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

Re: [R] From THE R BOOK - Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!

2010-03-30 Thread Rubén Roa
, 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

Re: [R] add information above bars of a barplot()

2010-03-22 Thread Rubén Roa
-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

Re: [R] tm[,-1]

2010-03-11 Thread Rubén Roa
. 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

[R] Tinn-R RGui Send problem

2010-03-10 Thread Rubén Roa
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

Re: [R] tcltk

2010-03-08 Thread Rubén Roa
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

Re: [R] Random real numbers

2010-03-02 Thread Rubén Roa
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

[R] Plotmath: suprscript on scalable delimiter?

2010-01-29 Thread Rubén Roa
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

Re: [R] discriminant analysis

2009-08-24 Thread Rubén Roa Ureta
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

Re: [R] MLE for bimodal distribution

2009-04-08 Thread Rubén Roa-Ureta
_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

Re: [R] R in the NY Times

2009-01-07 Thread Rubén Roa-Ureta
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

Re: [R] AD Model Builder now freely available

2008-11-25 Thread Rubén Roa-Ureta
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

Re: [R] Fitting data to a sigmoidal curve

2008-11-12 Thread Rubén Roa-Ureta
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){

Re: [R] Fitting a modified logistic with glm?

2008-11-09 Thread Rubén Roa-Ureta
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

Re: [R] Fitting a modified logistic with glm?

2008-11-08 Thread Rubén Roa-Ureta
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(...,

Re: [R] descretizing xy data

2008-11-04 Thread Rubén Roa-Ureta
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

Re: [R] descretizing xy data

2008-11-04 Thread Rubén Roa-Ureta
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

Re: [R] Distributions Comparison

2008-10-28 Thread Rubén Roa-Ureta
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

Re: [R] Question about glm using R

2008-10-21 Thread Rubén Roa-Ureta
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

Re: [R] distributions and glm

2008-10-21 Thread Rubén Roa-Ureta
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

Re: [R] how to plot the histogram and the curve in the same graph

2008-10-21 Thread Rubén Roa-Ureta
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

Re: [R] plot the chi square distribution and the histogram in the same graph

2008-10-21 Thread Rubén Roa-Ureta
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)

Re: [R] plot - central limit theorem

2008-10-15 Thread Rubén Roa-Ureta
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

Re: [R] R graph with values incorporated

2008-08-28 Thread Rubén Roa-Ureta
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)

Re: [R] draw a function over a histogram

2008-08-22 Thread Rubén Roa-Ureta
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)

Re: [R] Geodata object border

2008-08-12 Thread Rubén Roa-Ureta
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

Re: [R] geoR : Passing arguments to optim when using likfit]

2008-06-26 Thread Rubén Roa-Ureta
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

Re: [R] deleting variables

2008-04-29 Thread Rubén Roa-Ureta
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

Re: [R] R Newbie Question/Data Model

2008-04-25 Thread Rubén Roa-Ureta
[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)

Re: [R] finding an unknown distribution

2008-04-21 Thread Rubén Roa-Ureta
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

Re: [R] mixture distribution analisys

2008-04-10 Thread Rubén Roa-Ureta
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

Re: [R] analyzing binomial data with spatially correlated errors

2008-03-20 Thread Rubén Roa-Ureta
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

[R] comparing length-weight regressions]

2008-03-20 Thread Rubén Roa-Ureta
[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

Re: [R] Reading data into R

2008-01-03 Thread Rubén Roa-Ureta
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.