Displaying 20 results from an estimated 900 matches similar to: "fitting data to exponential distribution with glm"
2008 Dec 11
2
how to get the CDF of a density() estimation?
Hi,
I've estimated a simple kernel density of a univariate variable with
density(), but after I would like to find out the CDF at specific
values.
How can I do it?
thanks for your help, with it I am very close to finish my first
little bit more serious work in R,
Viktor
2003 Apr 24
5
Fast R implementation of Gini mean difference
I have written the following function to calculate the weighted mean
difference for univariate data (see
http://www.xycoon.com/gini_mean_difference.htm for a related
formula). Unsurprisingly, the function is slow (compared to sd or mad)
for long vectors. I wonder if there's a way to make the function
faster, short of creating an external C function. Thanks very much
for your advice.
gmd
2003 May 20
4
Output to connections
In the document "R Data Import/Export", section "Output to connections",
there is the following portion of code:
## convert decimal point to comma in output, using a pipe (Unix)
zz <- pipe(paste("sed s/\\./,/ >", "outfile"), "w")
cat(format(round(rnorm(100), 4)), sep = "\n", file = zz)
close(zz)
## now look at the output
2003 May 13
2
RMySQL crashes R
I have justed upgraded R v1.7.0 on Windows NT 4 and have installed the
latest RMySQL (version 0.5-1)and DBI (version 0.1-5) packages.
When I issue the following commands (tactfully adjusted) R just crashes and
disappears, any ideas?
require(RMySQL)
m <- dbDriver("MySQL")
con <- dbConnect(m, dbname="xxx", user="xxx", password="xxx",
2006 Feb 21
1
color quantization / binning a variable into levels
Hi all,
I'd like to quantize a variable to map it into a limited set of integers
for use with a colormap. "image" and filled.contour" do this mapping
inside somewhere, but I'd like to choose the colors for plotting a set of
polygons. Is there a pre-existing function that does something like this
well? i.e., is capable of using 'breaks'?
2005 Nov 08
1
Output glm
Hello,
How can I obtain the likelihood ratio of a Poisson regression model?
Regards.
_____________________________________________
dr. Marziliano Ciro
Facolta' di Economia
Universita' degli Studi di L'Aquila
p.zza del Santuario, 19
67040 Roio Poggio, L'Aquila
tel.: 0862 434836
fax: 0862 434803
2006 Feb 15
1
distribution fitting
Dear list,
Does anyone know how to fit the power law distribution?
I have the empirical distribution and would like to check whether it fits
the power law (with the power estimated from the data).
Any hints are appreciated.
Tanks a lot!
Galina
[[alternative HTML version deleted]]
2006 Feb 15
1
using kernel density estimates to infer mode of distribution
Hello...
Is it possible to use "density" or another kernel density estimator to
identify the mode of a distribution? When I use 'density', the resulting
density plot of my data is much cleaner than the original noisy histogram,
and I can clearly see the signal that I am interested in. E.g., suppose my
data is actually drawn from two or more normal (or other)
2009 Jul 06
1
transform multi skew-t to uniform distribution
Hi R-users,
I have a data from multi skew t and would like to transform each of the data to uniform data. I tried using 'pmst' but only got one output:
> rr1 <- as.vector(r1);rr1
[1] 0.7207582 5.2250906 1.7422237 0.5677233 0.7473555 -0.6020626 -2.1947872 -1.1128313 -0.6587316 -1.1409261
> pmst(rr1, xi=rep(0,10), Omega=diag(10), alpha=rep(1,10), df=5)
[1] 3.676525e-09
2006 Jan 23
1
mutlivariate normal and t distributions
Dear R-help list members,
I have created a package 'mnormt' with facilities for the multivariate
normal and t distributions. The core part is simply an interface to
Fortran routines by Alan Genz for computing the integral of two
densities over rectangular regions, using an adaptive integration
method. Other R functions compute densities and generate random
numbers.
The starting
2005 Sep 01
5
Multivariate Skew Normal distribution
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Caio Lucidius
> Naberezny Azevedo
> Sent: 01 September 2005 12:09
> To: Help mailing list - R
> Subject: [R] Multivariate Skew Normal distribution
>
>
> Hi all,
>
> Could anyone tell me if there is any package (or function)
2006 Apr 23
3
bivariate weighted kernel density estimator
Is there code for bivariate kernel density estimation?
For bivariate kernels there is
kde2d in MASS
kde2d.g in GRASS
KernSur in GenKern
(list probably incomplete)
but none of them seems to accept a weight parameter
(like density does since R 2.2.0)
--
Erich Neuwirth, University of Vienna
Faculty of Computer Science
Computer Supported Didactics Working Group
Visit our SunSITE at
2003 Aug 26
3
plot empirical pdf
Hi,
are there any function to plot the empirical probability distribution
function? I just don't want to reinvent the wheel...
Best wishes,
Ott
--
Ott Toomet
PhD Student
Dept. of Economics
?rhus University
Building 322
Universitetsparken
8000 ?rhus C
Denmark
otoomet (a) econ au dk
ph: (+45) 89 42 20 27
-------------------------------------------
(o_ (*_ (O_
2003 Jun 24
4
cumulative frequency distribution plot
Does R do cumulative frequency distribution plots?
--
Tommy E. Cathey, Senior Scientific Application Consultant
High Performance Computing & Scientific Visualization
SAIC, Supporting the EPA
Research Triangle Park, NC
919-541-1500 EMail: cathey.tommy at epa.gov
My e-mail does not reflect the opinion of SAIC or the EPA.
Federal Contact - John B. Smith
919-541-1087 - smith.johnb at epa.gov
2006 Mar 28
6
Remove [1] ... from output
Hello!
I am writing some numbers and character vectors to an ascii file and
would like to get rid of [1] ... as shown bellow (a dummy example)
R> runif(20)
[1] 0.653574 0.164053 0.036031 0.127208 0.134274 0.103252 0.506480 0.547759
[9] 0.912421 0.584382 0.987208 0.996846 0.666760 0.053637 0.327590 0.370737
[17] 0.505706 0.412316 0.887421 0.812151
I have managed to work up to remove quotes
2005 Nov 02
5
Distribution fitting problem
I am using the MASS library function
fitdistr(x, dpois, list(lambda=2))
but I get
Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) :
Function cannot be evaluated at initial parameters
In addition: There were 50 or more warnings (use warnings() to see the first
50)
and all the first 50 warnings say
1: non-integer x = 1.452222
etc
Can anyone tell me what I am doing
2003 Jul 14
2
Subsetting a matrix
I'd welcome some comments or advice regarding the situation described
below.
The following illustrates what seems to me to be an inconsistency
in the behaviour of matrix subsetting:
> Z<-matrix(c(1.1,2.1,3.1,1.2,2.2,3.2,1.3,2.3,3.3),nrow=3)
> Z
[,1] [,2] [,3]
[1,] 1.1 1.2 1.3
[2,] 2.1 2.2 2.3
[3,] 3.1 3.2 3.3
> dim(Z)
[1] 3 3
>
2003 Jun 21
1
optim with contraints
There seems to exist peculiar cases where optim does not take care
of constraints on the parameters to be optimized over. The call to
optim is of the form
opt <- optim(cp, fn=sn.dev, gr=sn.dev.gh, method="L-BFGS-B",
lower=c(-Inf, 1e-10, -0.99527),
upper=c( Inf, Inf, 0.99527),
control=control, X=X, y=y, hessian=FALSE)
The code has worked fine
2003 Aug 20
2
Method of L-BFGS-B of optim evaluate function outside of box constraints
Hi, R guys:
I'm using L-BFGS-B method of optim for minimization problem. My function
called besselI function which need non-negative parameter and the besselI
will overflow if the parameter is too large. So I set the constraint box
which is reasonable for my problem. But the point outside the box was
test, and I got error. My program and the error follows. This program
depends on CircStats
2007 Mar 17
1
Correlated random effects in lme
Hello,
I am interested in estimating this type of random effects panel:
y_it = x'_it * beta + u_it + e_it
u_it = rho * u_it-1 + d_it rho belongs to (-1, 1)
where:
u and e are independently normally zero-mean distributed.
d is also independently normally zero-mean distributed.
So, I want random effects for group i to be correlated in t, following an
AR(1) process.
Any idea of how