Displaying 17 results from an estimated 17 matches for "bresson".
Did you mean:
bressan
2007 Aug 01
1
Re : Custom axis
...do. I do not want to change the labels of the axis, but the scale. What I want is a general procedure for changing the scale. Its like using a logarithmic scale on a plot. Labels are the same, but the increases of x along the x-axis are defined by a known monotone and continuous function.
Florent Bresson
----- Message d'origine ----
De : "joris.dewolf at cropdesign.com" <joris.dewolf at cropdesign.com>
? : Florent Bresson <f_bresson at yahoo.fr>
Cc : r-help at stat.math.ethz.ch; r-help-bounces at stat.math.ethz.ch
Envoy? le : Mercredi, 1 Ao?t 2007, 12h01mn 58s
Objet : Re:...
2007 Jan 15
2
Kernel density output
Hi,
I'm using the density() command for a given vector x and I would like to know how to get the estimated value of the density for each element of the vector x instead of values corresponding to points from a grid.
Thanks
Florent Bresson
2006 Oct 16
5
Re : Generate a random bistochastic matrix
...y.btransf <- y.btransf+(mean(y)-mean(y.btransf))
as.vector(y.btransf) }
the fonction is designed to perform a mean-preserving transformation of a vector.
----- Message d'origine ----
De : Richard M. Heiberger <rmh at temple.edu>
? : Florent Bresson <f_bresson at yahoo.fr>; r-help at stat.math.ethz.ch
Envoy? le : Lundi, 16 Octobre 2006, 14h58mn 13s
Objet : Re: [R] Generate a random bistochastic matrix
bistochastic.3x3 <- function() {
B <- matrix(0, 3, 3)
## 2 df
tmp.1 <- runif(3)
B[1,] <- tmp.1/sum(tmp.1)
##...
2006 Oct 16
2
Re : Re : Generate a random bistochastic matrix
...ght. In fact, it's just an adaptation of a matlab command and the author advises using N^4 replications that's why it's the default in the function. The bistochastic matrix is not my subject of interest, but I need it to perform some random tranformation of a vector of incomes.
Florent Bresson
----- Message d'origine ----
De : Richard M. Heiberger <rmh at temple.edu>
? : Florent Bresson <f_bresson at yahoo.fr>; r-help at stat.math.ethz.ch
Envoy? le : Lundi, 16 Octobre 2006, 16h23mn 39s
Objet : Re: Re : [R] Generate a random bistochastic matrix
I am sorry, I can't fi...
2005 Dec 05
3
The gamma function and infinity
I have to calculate some formula like:
gamma(x)/(gamma(x+y)
and I observed that for relatively big values of x, R
returns infinity and so cannot compute the formula. Is
it possible to force R to give the real value of
gamma(x) instead of Inf ?
thanks
2006 Oct 16
2
Generate a random bistochastic matrix
Please, I would like to generate a random bistochastic matrix, that is a squared matrix of non-negative numbers with each row and each column sum to 1, for example :
.2 .3 .5
.6 .3 .1
.2 .4 .4
I don't know of to code this. Do you have any idea ?
Thanks
Florent Bresson
___________________________________________________________________________
Demandez ? ceux qui savent sur Yahoo! Questions/R?ponses
2006 Jul 19
3
Progress in a loop
Hi, I have to use a loop to perform a quite computer
intensive estimation and I would like to know the
progress of the loop during the process. I tried to
include something like
print(paste(k,date(),sep=" : "))
where k is the number of the iteration, but the result
appears only at the end of the loop. Can someone help
me please ?
2005 Nov 28
3
optimization with inequalities
I have to estimate the following model for several
group of observations :
y(1-y) = p[1]*(x^2-y) + p[2]*y*(x-1) + p[3]*(x-y)
with constraints :
p[1]+p[3] >= 1
p[1]+p[2]+p[3]+1 >= 0
p[3] >= 0
I use the following code :
func <- sum((y(1-y) - p[1]*(x^2-y) + p[2]*y*(x-1) +
p[3]*(x-y))^2)
estim <- optim( c(1,0,0),func, method="L-BFGS-B" ,
lower=c(1-p[3], -p[1]-p[3]-1,
2005 Oct 31
3
Applying a function to a vector
I have defined a function to compute the value of a
beta distribution of the second kind (the existing
beta distribution of th stats package is the beta
distribution of the first kind). It works perfectly
for a single value, but I want to apply it to a vector
of 22 000 values. I can use a loop for the calculation
of each value but it runs very very slowly.
So, what can I change ?
Hers's the
2007 Aug 24
2
Applying a function to an array
Dear R-users,
I would like to apply a function (more precisely sd()) over the third dimension of a three-dimension array. The function apply would be interesting but the chosen function can only be applied on the rows and columns of the array according to the help file. I can use a loop to cut the array in matrices and then use apply for each replication, but it's not very nice. A small
2009 Jan 07
1
Importing data from SPSS with Arabic encoding
...and last lines can be translated into "error reading system-file header" and "Hhld.sav: position 0: Variable name begins with invalid character". That's why I suppose it is a problem with the encoding. Does someone has an idea of the solution to my problem?
Thanks
Florent Bresson
2005 Nov 16
2
numericDeriv
I have to compute some standard errors using the delta
method and so have to use the command "numericDeriv"
to get the desired gradient. Befor using it on my
complicated function, I've done a try with a simple
exemple :
x <- 1:5
numericDeriv(quote(x^2),"x")
and i get :
[1] 1 8 27 64 125 216
attr(,"gradient")
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] Inf
2006 Jan 12
2
tapply and weighted means
I' m trying to compute weighted mean on different
groups but it only returns NA. If I use the following
data.frame truc:
x y w
1 1 1
1 2 2
1 3 1
1 4 2
0 2 1
0 3 2
0 4 1
0 5 1
where x is a factor, and then use the command :
tapply(truc$y,list(truc$x),wtd.mean, weights=truc$w)
I just get NA. What's the problem ? What can I do ?
2005 Dec 11
1
Quantile function for the generalized beta distribution of the 2nd kind
I have succeded in defining the cdf of the generalized
beta of the second kind, eg.
pgbeta2 <- function(quint,b,a,p1,p2) {
integrate(function(x)
{exp(log(a)+(a*p1-1)*log(x)-(a*p1)*log(b)-log(beta(p1,p2))-(p1+p2)*log(1+(x/b)^a))},0,quint)$value
}
but I'm facing problems with the quantile function. I
tried something like
qgbeta2 <- function(proba,b,a,p1,p2) {
optimize(function(z)
2005 Dec 29
1
search in matrix
I'm dealing with a matrix like :
"x" "y" "z"
[1,] 2 4 1
[2,] 6 1 2
...
[n,] 7 3 1
For each row I would like to know the header of the
column which corresponds to the minimum value. In the
case of my matrix, I would like to obtain the
following vector :
z y ... z
Any idea ?
2006 Nov 06
1
Subset and levels
Hi, I've got a very simple problem but cannot find the solution. I'm using two data frames (say X and Y) and I want to get a subset of one according to the different levels of a variable "code" of the other data frame. I tried something like
Z <- subset(X, code==levels(Y$code)) (1)
but it does not work. I do not want to do something like
Z <-
2005 Oct 19
1
Problem with na in nls
I'm trying to run a nls on a subset of a data.frame.
In the subset, one observation is NA. So I drop the
observation but when I ask for :
>sm <- nls(machin$revcum ~
Lc.singh(machin$popcum,p), start=list(p=c(2,3)))
I get :
Erreur dans parse(file, n, text, prompt) : syntax
error in "~ "
If I put some value for the non available observation
instead of droping it, it works.