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 documentatio

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 data

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 three

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 sm

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){ salam.size.mod

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)

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(..., famil

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

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 distribut

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) (wh

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 ide

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 estimat

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 use

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 t

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) plot(x,

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] Coordinate systems for geostatistics in R

2008-08-22 Thread Rubén Roa-Ureta
imicola wrote: Hi, I read somewhere that when carrying out geostatistical analysis in R you should not use latitude and longitude...can anyone expand on this a little for me, and what would be the best coordinate system to use? Not only in R. In most systems, the inter-point distances are ass

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 hessia

[R] Solving for parameter values at likelihood points

2008-05-06 Thread Rubén Roa-Ureta
ComRades, On Oct 16, 2006, I posted a question regarding how to find the parameter values that made the likelihood function take a value equal to 1/8th of the maximum likelihood value. There was no reply but I found a solution and would like to know if there is a better solution using the funct

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 to

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(

Re: [R] Modeling presence only data in R

2008-04-22 Thread Rubén Roa-Ureta
milton ruser wrote: > Dear All, > > I have a set of environental maps and presence-only points for some species. > How can I generate distributions models on R using these presence-only data? > What packages and functions can I use to do so? > > Kind regards, > > Miltinho > Brazil If you have l

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 normaliz

Re: [R] memory issues

2008-04-16 Thread Rubén Roa-Ureta
I think any geostatistical program/R package would have trouble handling 12000 observations on a PC. The empirical variogram would be built with the combinations of 12000 over 2 pairs, nearly 72 millions pairs, and during kriging, if you didn't restrict the search neighbourhood, interpolation w

Re: [R] Confidence intervals of log transformed data

2008-04-16 Thread Rubén Roa-Ureta
tom soyer wrote: > Hi > > I have a general statistics question on calculating confidence interval of > log transformed data. > > I log transformed both x and y, regressed the transformed y on transformed > x: lm(log(y)~log(x)), and I get the following relationship: > > log(y) = alpha + beta * l

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 i

[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 wha

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

2008-03-20 Thread Rubén Roa-Ureta
ls. But I believe the likelihood-based geostatistical model is the same as a generalized linear mixed model where the distance is the random effect. In SAS you can do this using the macro glimmix but from the point of view of generalized linear mixed models because there they have implemented a c

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