Displaying 20 results from an estimated 300 matches similar to: "Optimization - n dimension matrix"
2010 Sep 21
5
Can ucminf be installed in 64 bit R and one more question?
Hey, R Users
my windows is 64 bit windows 7.?I am trying to install the package ucminf into
my 64 bit version R but cannot.??the package I downloaded is from
http://cran.r-project.org/web/packages/ucminf/index.html?and I installed it with
the "install from local zip files", due to I did not connect my computer to
internet.
did anyone meet this problem and is there a version of
2023 Aug 13
4
Noisy objective functions
While working on 'random walk' applications, I got interested in
optimizing noisy objective functions. As an (artificial) example, the
following is the Rosenbrock function, where Gaussian noise of standard
deviation `sd = 0.01` is added to the function value.
fn <- function(x)
(1+rnorm(1, sd=0.01)) * adagio::fnRosenbrock(x)
To smooth out the noise, define another
2010 Jun 22
1
Subject: Re ZINB by Newton Raphson??
I have not included the previous postings because they came out very strangely on my mail
reader. However, the question concerned the choice of minimizer for the zeroinfl()
function, which apparently allows any of the current 6 methods of optim() for this
purpose. The original poster wanted to use Newton-Raphson.
Newton-Raphson (or just Newton for simplicity) is commonly thought to be the
2010 Nov 16
4
DBLEPR?
Ravi Varadhan and I have been looking at UCMINF to try to identify why it gives occasional
(but not reproducible) errors, seemingly on Windows only. There is some suspicion that its
use of DBLEPR for finessing the Fortran WRITE() statements may be to blame. While I can
find DBLEPR in Venables and Ripley, it doesn't get much mention after about 2000 in the
archives, though it is in the R FAQ
2010 Nov 16
4
DBLEPR?
Ravi Varadhan and I have been looking at UCMINF to try to identify why it gives occasional
(but not reproducible) errors, seemingly on Windows only. There is some suspicion that its
use of DBLEPR for finessing the Fortran WRITE() statements may be to blame. While I can
find DBLEPR in Venables and Ripley, it doesn't get much mention after about 2000 in the
archives, though it is in the R FAQ
2007 Aug 01
1
constrOptim
Hi,
I'm having trouble using the constrOptim function to generate the
9-component vector argmin of the function ELfsds:
ELfsds <- function(pvechat){
LG=0
for(i in 1:9){
LG=LG+log(pvechat[i])
}
return(-LG)
}
with accompanying gradient function:
gradfunc <- function(thetavec){
g=1/(9*thetavec)
return(g)
}
The constraints on the optimization problem are:
1 - components of
2011 Jun 14
2
Off-topic: (Simple?) Random Sampling when n is a random variable
Hi everyone,
I'm involved in a discussion with a colleague. He suggested a sample
design for a finite-sized process that (to all intents and purposes)
involves tossing a coin and examining the unit if the coin shows
Heads.
I should emphasize that we're both approaching the problem from a
design-based sampling theory point of view. So I have no argument
about the appropriateness of the
2009 Aug 28
4
Numeric, 2 ??? as a result of marix???
Strange things are going on in R, if you reshape a matrix in R:
> g=gretldata[1:2,]
> g
Empfang Versand Transit Inland Ausland SumS
1 787844.0 1307176.6 223395.4 1474726 16199.1 3809341
2 421473.1 306445.4 448801.2 1779402 14445.6 2970567
> dim(g)
[1] 2 6
> as.vector(g)
Empfang Versand Transit Inland Ausland SumS
1 787844.0 1307176.6 223395.4 1474726 16199.1
2006 Mar 07
3
returning the largest element in an array/matrix?
Hi all,
I want to use "which.max" to identify the maximum in a 2D array/matrix and I
want "argmin" and return the row and column indices.
But "which.max" only works for vector...
Is there any convinient way to solve this problem?
Thanks a lot!
[[alternative HTML version deleted]]
2003 Dec 18
2
: Lp norm estimation
Hi all
Just wondering whether one can undertake Lp norm estimation (a type of
regression analysis) in R?
i.e.
argmin S ( | y(i) - x(i)b | ^p )
where:
* S is the summation over observation i= 1,2,...,n
* y is a vector of n observations
* x is an n by p matrix of explanatory variables
* b is a p by 1 vector of beta coefficients and
* p is a constant to be estimated such that
2011 Apr 28
1
Undefined columns selected
This is part of my program. I am getting an error, that I cannot figure out, any help would very much appreciated, thanks.
# subset variables
arc <- arc[,c("SNAP", "code", "ncode", "var", "n_total")]
Error in `[.data.frame`(arc, , c("SNAP", "code", "ncode", :
undefined columns selected
arc$N_eff <-
2011 May 02
1
UNIX-like "cut" command in R
The R "cut" command is entirely different from the UNIX "cut" command.
The latter retains selected fields in a line of text. I can do that kind
of manipulation using sub() or gsub(), but it is tedious. I assume there
is an R function that will do this, but I don't know its name. Can you
tell me?
I'm also guessing that there is a web page somewhere that will tell
2011 May 04
1
problem with package "adapt" for R in Mac
Hi,
How i can install the package "adapt" in some version of R for mac?
i try in 2.13, 2.9,2.7 and other previous versions... and nothing happens.
and another question: There are some packages that do the same but that it
is implemented for mac? (calculate integrals in 2 or more dimmensions).
help me please, it's for an important work.
greetings.
--
Matías Hernán Ramírez
2011 May 05
1
functions pandit and treebase in the package apTreeshape
Hello.
I'm trying to use the functions pandit and treebase. They are in the package apTreeshape. Once I've loaded the package, R responses:
- no function pandit/treebase.
Somebody knows why or what is the reason?
Thanks,
Arnau.
------------------------------------------------------------
Arnau Mir Torres
Edifici A. Turmeda
Campus UIB
Ctra. Valldemossa, km. 7,5
07122 Palma de Mca.
2013 Feb 04
1
How to obtain the model/equation at each level automatically in a regression model with a few factors
I am wondering how to obtain the model/equation at each level automatically
in a regression model with a few factors
without looking at summary of the lm model. For example, consider
lm.factors <- lm(y ~ x1 + factor(x2)*factor(x3)+x4*factor(x5))
The coefficients of lm.factors in summary(lm.factors) might be complicated.
I would like to have the equation at each level from lm.factor.
Could you
2011 May 04
1
bivariate linear interpolation
Hi,
I have three matrices (X,Y,P) with the same dimension. The X,Y grid is
regular and I want to
perform linear interpolation to pick out certain points. In matlab
appropriate call is
something like
Pout=interp2(X,Y,P,Xout,Yout, method="linear")
where Xout and Yout are the locations where I want the Pout data
(typically a different grid).
(Scipy has this routine in
2011 May 04
1
two-way group mean prediction in survreg with three factors
I'm fitting a regression model for censored data with three categorical
predictors, say A, B, C. My final model based on the survreg function is
Surv(..) ~ A*(B+C).
I know the three-way group mean estimates can be computed using the predict
function. But is there any way to obtain two-way group mean estimates, say
estimated group mean for (A1, B1)-group? The sample group means don't
2011 May 03
1
delete excel id automatically generated
Dear community,
I uploaded an excel with read.xls. My xls file actually have a column which
is an id, ("plot" is the id) :
plot height area
34 7.6 5.4
85 3.2 4.1
89 5.4 8.4
121 6.7 6.2
...
1325 2.1 1.5
However R uses another id, this way:
r id plot height area
1 34 7.6 5.4
2 85 3.2 4.1
3 89 5.4 8.4
4 121
2011 May 04
1
Uniform Gaussian Kernel
I have a vector with lots of different numbers. I need to make a graph
showing the Uniform Distribution of the figures. I have created a graph
showing all the different values, but now want individual Gaussian Kernel
round each point. This is what I have but each time it comes up with an
error as I have just based it on the Normal Distribution, but I'm not sure
what I need to change to make it
2011 Apr 28
1
Variance
I'm trying to find the variance of various outputs in a matrix:
for(l in 2:vl){
for(o in 1:(l-1)){
# Make sure the inputs are for the matrix "m"
input3=rownames(v)[o]
input4=colnames(v)[l]
r=t[(t$Rec1==input3 & t$Rec2==input4),output]
if(length(r)==0){
r=t[(t$Rec1==input4 & t$Rec2==input3),output]
}
v[l,o]=var(q,na.rm=TRUE)