Displaying 20 results from an estimated 5000 matches similar to: "maximum likelihood problem"
2010 Oct 02
1
[Fwd: RE: maximum likelihood problem]
I forgot to add that I first gave a starting value for K.
Nonlinear least squares won't work because my errors are not normally
distributed.
Any advide on my maximum likelihood function would be greatly appreciated.
---------------------------- Original Message ----------------------------
Subject: RE: [R] maximum likelihood problem
From: "Ravi Varadhan" <rvaradhan at
2010 Oct 01
4
cleaning up a vector
I calculated a large vector. Unfortunately, I have some measurement error
in my data and some of the values in the vector are erroneous. I ended up
wih some Infs and NaNs in the vector. I would like to filter out the Inf
and NaN values and only keep the values in my vector that range from 1 to
20. Is there a way to filter out Infs and NaNs in R and end up with a
clean vector?
Mike
2010 Sep 29
2
repeat a function
I have R randomly sampling my array made up of 2 columns of data. Here is
my code randomly sampling 5 different rows from my dataset to create a new
dataset of 8 rows of data:
testdat<-growth[sample(5,8,replace=T),]
Now I want to tell R to repeat this function 50 times and give me the
output. I have been searching the internet and have been unable to figure
this out. Any advice
2010 Sep 29
2
need help with ramdomly sampling some data
I am trying to get R to randomly select values from my dataset (i.e.
bootstrapping) with replacement. However, my attempts at this have been
unsuccessful. Here is a basic example of what I am doing:
I have a data vector of 8 values (i.e. data= 2,5,9,4,5,6,7,8). I used the
sample function and it worked. However, it only repeated my values in the
exact same order as the dataset. It did not
2010 Sep 29
2
resampling issue
I am trying to get R to resample my dataset of two columns of age and length
data for fish. I got it to work, but it is not resampling every replicate.
Instead, it resamples my data once and then repeated it 5 times.
Here is my dataset of 9 fish samples with an age and length for each one:
Age Length
2 200
5 450
6 600
7 702
8 798
5 453
4 399
1 120
2 202
Here is my code which resamples my
2010 Sep 28
1
ramdom sampling from a dataset
I am trying to get R to pick random integers from my dataset (i.e.
bootstrapping) with replacement. However, my attempts at this have been
unsuccessful. Here is a basic example of what I am doing:
I have a data vector of 8 integers (data= 2,5,9,4,5,6,7,8). I used the
sample function and it worked but it only repeated my values in the exact
same order. It did not randomly sample them. Here
2010 Sep 29
1
next step in randomly sampling
Thanks to the people on this list I was able to fix my code for randomly
sampling. Thanks.
Now, I am moving on to the next step and I ran into another snag. I have a
large dataset but I am starting with a small made-up dataset until I figure
it out. I have two columns of data (age and length). I got R to read my
data called growth which is the age and length for 10 fish:
>
2013 May 18
3
bar plot with non-zero starting level
Hi,
I want to plot grouped bars to compare 95% confidence interval estimates
from two models. Each bar represents a 95% confidence interval estimate
of a coefficient from one of the two models. Each group represents
confidence interval estimates of the same coefficient from the two models.
I think such a bar plot will nicely present whether 95% confidence
interval estimates of the same
2010 Apr 04
4
ggplot2 geom_rect(): What am I missing here
Hi R fans,
As a newbie following the five-hour rule (after hitting my head against
the wall for five hours, post to this list), I am appealing for some
help understanding geom_rect() in ggplot2.
What I want to do is very simple. I want to generate a plot of
rectangles. Each one represents a business cycle. The x-values will be
pairs representing the start and end of each cycle. The y-values
2013 Mar 22
4
ggplot2 will not draw a rectangle. Error: ggplot2 doesn't know how to deal with data of class XXX"
What am I missing? When I run the code below I get the error message
"Error: ggplot2 doesn't know how to deal with data of class function"
Googling suggests a message of "Error: ggplot2 doesn't know how to deal with data of class XXX" is not uncommon but I don't see why I am getting a "function" error unless I am using some reserved word?
2002 Jan 25
2
selecting clusters of points
All:
Are there any functions out there for selecting all the
points in a region of a plot. I envision something like the
identify() function except one could circle a cloud of points (and
perhaps a vector would be returned of the same length as the points
plotted indicating logical membership in the circled cloud). Perhaps
someone has done something with the locator() function that would
2007 Jun 04
2
Abstract plot
I want to make a plot, but instead of showing _numerical_ values,
I would like to show _symbolic_ values.
For example, I want to plot a function y = a x + b, where
x varies between Xmin and Xmax. I would like the plot
to show, in the x-axis, the strings Xmin and Xmax, instead
of their numeric values. Is it possible?
Alberto Monteiro
2008 Apr 22
3
Using the 'by' function within a 'for' loop
Dear R experts,
I am sorry for sending this email again. I would
imagine yesterday and maybe today, have been very busy
days with the release of R v 2.7.0. I join all the R
users who are very gratful for your contant work and
efforts, specially knowing that you are doing this for
the sake of science, without gettig any compensation
for that.
Having written that, I decided to send the
2006 Jul 10
2
Setting the colors of lines in a trellis plot...
With some help from those with expertise on this list, I managed to
produce a plot using trellis that looked like I wanted it to look.
Now, I need to take the same plot and make the lines on it color, but
I want to specify the color for the lines myself.
I've managed to make the key use the colors I want. I've managed to
make the symbols of the actual plot use the colors I want. But I
2014 Jun 15
2
abline; setting plot limits
Relatively new user with a question regarding abline.
I want to draw a st. line fit to some data but I want the line to span the
range of the x-data and NOT the plot limits.
In short the line spans xmin to xmax(of plot axis) but I want it to span
xmin to xmax (of x data).
Can this but done with abline or do I have to use lines and construct the
line from a+bx?
Paul Rydelek, Ph.D.
5232 Dorset
2010 Sep 29
2
fitting model to resampled data
I apologize if this comes across as confusing. I will try to explain my
situation as best I can.
I have R bootstrapping my growth data for fish. It's resampling my database
of age and length data and then produces several new datasets for me. In
this case, it's resampling my data to create three new datasets of age and
length data. Here is my code with my original data called
2008 Jan 29
2
how do i creat multiple back to back histograms?
Een ingesloten tekst met niet-gespecificeerde tekenset is
van het bericht gescrubt ...
Naam: niet beschikbaar
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080129/23f6cbc7/attachment.asc
2008 Jul 30
1
read XML
I have a xml exported by Manifold GIS but I'm not being able to import it
into R using XLM package.
The file have this structure:
<?xml version="1.0" encoding="UTF-8" ?>
- <layout>
<name>Layout 2</name>
<pagesByX>1</pagesByX>
<pagesByY>1</pagesByY>
- <elements>
<legend
2004 Sep 24
3
Error with repeat lines() in function
I have a function that does some plotting. I then add lines to the
plot. If executed one line at a time, there is not a problem. If I
execute the function, though, I get:
Error in ans[[1]] : subscript out of bounds
This always occurs after the second lines command, and doesn't happen
with all of my data points (some do not have errors). Any ideas?
Thanks,
Sean
2000 Dec 14
2
Accuracy problem in dchisq for non-central chi-squared
Hi,
I think I have identified a inaccuracy in dchisq when the non-centrality
parameter is non-zero and large. Here's a little test:
sys.dchisq.test <- function(N = 100000,mean = 0)
{
z <- rnorm(N,mean = mean, sd = 1)
x <- z^2
xmin <- min(x)
xmax <- max(x)
br <- seq(xmin,xmax,length = 101)
dbr <- br[2]-br[1]
hist(x,br)
p <- dchisq(br,df = 1,ncp =