Displaying 20 results from an estimated 2000 matches similar to: "optimisation procedure with flat log-likelihood"
2005 May 15
1
Save parameters from optim during iteration procedure
Dear R-users,
I am going to try to be as clearer as possible, showing also an example.
1) I have a function (in my real case it's much more complex)
2) I use "optim" to minimize
3) I want to use as method L-BFGS-B for several reasons
4) I know I could use "trace=6" (in "control") in order to see "live"
the procedure
5) I would like to see separately the
2009 Apr 08
1
persp3d and rgl.viewpoint for rotating 3D plots
Dear R-users,
within the rgl-package, I would have a question about the usage of persp3d in combination of rgl.viewpoint.
I am not able to figure out how to let a 3D plot rotating around likewise the example in ?rgl.viewpoint. It seems that when I use persp3d(...) I see something on my screen, which is different from what I get when it's rotating. Is there any different behavior between
2009 Mar 19
1
two plots side-by-side with persp3d(rgl)
Dear R-users,
I would like to place two 3D plots side-by-side in a rgl-setting. It would nice to have something like "par(mfrow=c(1,2))" for basic plots, or an array framework for wireframe(lattice) (see example below). I only managed to overlap two persp3d plots.
My final idea would be to animate both surfaces using play3d(rgl).
Thanks in advance for any help.
Best,
Carlo Giovanni
2006 May 16
1
optim with specific constraints on possible values
Dear R-users,
I am working with some grid-search optimization for 13 values of an
object function.
At glance one may compute the object function for each possible
combination of set of parameters, but in my case would not be feasible:
taking for example 13 possible values for each parameters like, in
logarithm scale, 10^seq(-3,3,.5) will lead to 13^13 combinations of
results.
As a second trial
2006 Jan 30
3
Subsetting a matrix without for-loop
Dear R-users,
I'm struggling in R in order to "squeeze" a matrix without using a
for-loop.
Although my case is a bit more complex, the following example should
help you to understand what I would like to do, but without the slow
for-loop.
Thanks in advance,
Carlo Giovanni Camarda
A <- matrix(1:54, ncol=6) # my original matrix
A.new <- matrix(nrow=3, ncol=6) # a new
2013 Apr 19
3
extracting the diagonal of an inverse matrix
Dear R-users,
I would like to know whether there is a way to extract a diagonal of an inverse matrix without computing the inverse of the matrix itself. The size of my matrices are really huge and, also using sparse matrix, computing the inverse leads to storage problems and low speed.
In other words, given a square matrix A, I aim to know diag(B), where B=solve(A), without computing solve(A).
2005 Oct 12
1
Historical England and Wales Shape Files
Dear R-user,
I would like to apply spatial statistics on some historical data, in
particular from 1850 to 1900 by registration district of England and
Wales.
I have searched in the R-archive, but unsuccessfully.
Do you know whether R contains those shape files? Or where would be
possible to download and use in R?
Thanks in advance,
Carlo Giovanni Camarda
+++++
This mail has been sent through the
2012 Oct 26
1
matrix algebra for constructing a special matrix?
Dear R-users,
would it be a better way to construct the matrix below without using any for-loop or model.matrix? preferably with some matrix algebra?
Thanks in advance,
Carlo Giovanni Camarda
## dimensions
m <- 3
n <- 4
mn <- m*n
k <- m+n-1
## with a for-loop
X <- matrix(0, mn, k)
for(i in 1:n){
wr <- 1:m+(i-1)*m
wc <- rev(1:m+(i-1))
where <- cbind(wr,wc)
2005 Oct 18
1
Solid and dotted lines saving an xyplot
Dear R-users,
I would a small problem saving a graph with postscript after using
xyplot.
Whereas in the R-screen the two lines are solid, once the image is saved
as .eps file the second lines (blue in the following example) is dotted.
Here there is a simple example.
Thanks in advance for your help,
Carlo Giovanni Camarda
# creating data
a1 <- sort(runif(10))
a2 <- sort(runif(10))
a3 <-
2009 Aug 06
1
Using 'field names' of a data.frame in a function
I may be doing this wrong! but I have a function which I have simplified a lot below. I want to pass some 'field names' of a data-frame to the function for it to then do some manipulation of.
Here's my code:
#build a simple dataset
mydataset = data.frame (
2005 Jun 14
2
Plotting rows (or columns) from a matrix in different graphs, not using "par"
Dear R-users,
I would like to ask whether it's possible (for sure it would be), to
plot each rows (or columns) in different graphs and in the same figure
region without using the function "par" and then struggling around with
"axes" and labels etc.
Luckily, I would always have "rows + columns = even number" and the same
"ylim".
The next one could be a
2009 Mar 11
1
matrix multiplication, tensor product, block-diagonal and fast computation
Dear R-users,
I am searching to the "best" way to compute a series of n matrix
multiplications between each matrix (mXm) in an array (mXmXn), and each
column of a matrix (mXn).
Please find below an example with four possible solutions.
The first is a simple for-loop which one might avoid; the second
solution employs the tensor product but then manually selects the right
outcomes. The
2007 Mar 03
2
format of summary.lm for 2-way ANOVA
Hi,
I am performing a two-way ANOVA (2 factors with 4 and 5 levels,
respectively). If I'm interpreting the output of summary correctly,
then the interaction between both factors is significant:
,----
| ## Two-way ANOVA with possible interaction:
| > model1 <- aov(log(y) ~ xForce*xVel, data=mydataset)
|
| > summary(model1)
| Df Sum Sq Mean Sq F value Pr(>F)
|
2006 Feb 01
1
glm-logistic on discrete-time methods with individual and aggregated data
Dear R-Users,
without going into details I tried to prepare a simple example to show
you where I would need help.
In particular I prepare two examples-template for a study I'm conduction
on discrete-time methods for survival analysis.
Each of this example has two datasets which are basically equal, with
the exception that in the former one has individual data and in the
latter one aggregated
2004 Aug 30
3
Generalized Singular Value Decomposition (GSVD)
Dear R-users,
I couldn't find a function or some help in R-project web about the
Generalized Singular Value Decomposition. In MatLab there is a simple
function for this algebric issue (gsvd). Is there anything like that in R?
And, if not, could you help me to apply this method in R?
Thanks in advance, Giancarlo
+++++
This mail has been sent through the MPI for Demographic Rese...{{dropped}}
2006 Jul 28
2
Extracting from a matrix w/o for-loop
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060728/957eb23c/attachment.pl
2013 Jul 12
2
vegan capscale 'subscript out of bounds' error
Hi list,
I am using the capscale function in vegan_2.0-7 to do a constrained
principal coordinates analysis, and I kept getting the following error
message:
Error in Y.r[, oo, drop = FALSE] : subscript out of bounds
I googled but I couldn't find an answer. Could anyone tell me why this
error msg and what to do?
Here is the command I used:
2006 Feb 27
1
Different deviance residuals in a (similar?!?) glm example
Dear R-users,
I would like to show you a simple example that gives an overview of one
of my current issue.
Although my working setting implies a different parametric model (which
cannot be framed in the glm), I guess that what I'll get from the
following example it would help for the next steps.
Anyway here it is.
Firstly I simulated from a series of exposures, a series of deaths
(given a
2013 Mar 25
1
count NAs with aggregate
Dear members of this list,
I'd like to count missing values using the aggregate function.
Something like this:
count_nas <- function(arg1) {
return(sum(is.na(arg1)))
}
aggregate(cbind(var1, var2, var3) ~ subject + time, data = mydataset,
count_nas)
It's not working: I end up with a matrix containing zeros, although
there are missings in the data frame.
I'd highly
2012 May 16
2
replacing with NA
Dear R users,
I was wondering how I can replace the values of a vector with the values from in another vector in the same row
For example, how can I replace the value of x below with NA when the value of Z in the same row is NA?
x <-1:20
z<- c(11, 15, 17, 2, 18, 6, 7, NA, 12, 10,21, 25, 27, 12, 28, 16,17, NA, 12, 10)
Many thanks
Mintewab
________________________________________
Fr?n: