Displaying 20 results from an estimated 20000 matches similar to: "Q. regarding optim()"
2006 Jan 12
4
Loading Excel file into Limma
Dear mailing group,
This is my first time here. Glad to have this resource!
I am currently trying to load an Excel file into R (limma package loaded)
using the source(*name of directory*) command, but it cannot open the file.
I renamed the file as .R and .RData, to no avail. The Excel data contains
one gene name per row and about 100 data points per gene (columns).
I am only used to
2006 Feb 06
6
problem with simple if() statement
the following code apprantely, for some grand old reason, induces a syntax error:
if (seq[i] = "A") m <- trans[1,]
where seq is a vector and trans is a matrix. I cannot for the life of me see why this is wrong. Syntax error is:
Error: syntax error in "if (seq[i] ="
Sincerely,
Norman Goodacre
---------------------------------
2006 Jan 18
4
Coercing a list to integer?
Dear group,
I am nearly beside myself. After an entire night spent on a niggling little detail, I am no closer to to the truth. I loaded an Excel file in .csv form into R. It apparentely loads as a list, but not the kind of list you can use. Oh no, it converts into a list that cannot be converted into an integer, numeric, or vector, only a matrix, whihc is useless without integers.
2006 Feb 06
1
generating markov chain
Dear help group,
Just fyi a markov chain is a sequence of transitions between states (say A,T,G,C - on a gene) with a given probability for each transition. In this case there'd be 16 different kinds, each with a different weight.
Given a transition matrix (4x4) filled with all transition probabilities of course, how can I generate a random sequence of a given length, say 200?
2005 Aug 04
4
optim
Dear R-helpers,
The function optim implements algorithms that I would like to use.
I have function implemented in R, which given the parameters of which
minimization is to take place returns a scalar as well as the gradient.
Unfortunately optim requires two function _fn_ and _gr_ where fn returns the
function value and gr the gradient. Splitting my function in two functions
would be easy,
2006 Jul 15
1
R installation - WINDOWS - problem
Dear R mailing group,
I am having extreme - and mysterious - trouble installing R. I tried
simply dl ing R-2.3.1.tar.gz, and unzipping it, but after doing so, nowhere
could I find a file called R-2.3.1.exe. I did however find an
R-2.3.1.exe.manifest.
I therefore tried the command line installation command - given in
R-admin.pdf. This command is: tar zxvf R-2.3.1.tgz
This is strange
2006 Mar 27
1
Missing Argument in optim()
Hello everybody,
i already searched the archieves, but i still don't know what is wrong
in my implementation, mybe anybody coud give me some advice
ll1<-function(rho,theta,beta1,beta2,beta3,beta4,t,Szenariosw5,Testfaellew5,X1,X2)
{
n<-length(t)
t<-cumsum(t)
tn<-t[length(t)]
Szenn<-Szenariosw5[length(Szenariosw5)]
2006 Jan 17
1
Clustering function
Dear mailing group,
I have loaded an Excel file into R by calling it ".csv" and using the
"read.csv" function in R. However then I want to use the (limma package
specific, I believe) function "hclust", which clusters data in a tree
dendrogram, by similarity. However, I receive the errors msg.s: 1) "missing
observations in cov/cor" 2) "In
2001 Nov 22
2
optim ???
Hola!
santes<-c(210,169,187,160,167,176,185,206,173,146,174,201,198,148,154)
sdespues<-c(201,165,166,157,147,145,168,180,147,136,151,168,179,129,131)
dantes<-c(130,122,124,104,112,101,121,124,115,102,98,119,106,107,100)
ddespues<-c(125,121,121,106,101,85,98,105,103,98,90,98,110,103,82)
presion<-data.frame( santes, sdespues, dantes, ddespues)
logvero <-
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
2005 Oct 11
2
Sometimes having problems finding a minimum using optim(), optimize(), and nlm() (while searching for noncentral F parameters)
Hi everyone.
I have a problem that I have been unable to determine either the best
way to proceed and why the methods I'm trying to use sometimes fail. I'm
using the pf() function in an optimization function to find a
noncentrality parameter that leads to a specific value at a specified
quantile. My goal is to have a general function that returns the
noncentrality parameter that
2002 Feb 05
2
passing parameters in optim()
Hi all,
I am using optim() to get estimate for parameter 'a' which will minimize
the output of lprob.catch(a) and I got an error message:
> optim(2,lprob.catch(x, freq,1, 0.5,0.5, a,- 0.7, 1, -0.7,0.1,
1,0.2,2,1,data.sf.mont))
Error in catch2.fun(k, f1, f2, a, b, A, B, R, n0, av, index.n) :
Object "a" not found
Why wasn't the initial value of a=2 passed to
2003 Oct 31
1
Optimization of objective function with generic number of arguments (R-Extension with C code)
Hi All! I'm a new subscriber to this mailing list. I'm writing an R
extension with C linked code having a minimization function letting me pass
it an objective function with a GENERIC number of arguments and letting me
to optimize over a specific one among them if there are many.
#################################################
############### IPOTETICAL MAIN ###############
2003 Oct 29
1
constrOptim doesn´t send arguments to optim!(?)
Hi,
I think that there something wrong with the 'constrOptim' max/minimization
function because she doesn?t send extra arguments to 'optim' call.
Fact: When I use optim in a f(x,theta)-like function, everything goes ok.
But using constrOptim with the same function leads to error...
Proof: Make a small change in the 'Rosenbrock Banana function' (taken from
the Examples
2023 Aug 03
3
feature request: optim() iteration of functions that return multiple values
Dear all,
I have used optim a lot in contexts where it would useful to be able to iterate function myfun that, in addition to the primary objective to be minimized ('minimize.me'), could return other values such as alternative metrics of the minimization, informative intermediate values from the calculations, etc.
myfun <- function()
{
...
return(list(minimize.me = minimize.me, R2 =
2007 Apr 10
1
nlm() and optim()
Dear R-users,
I have just joint the list and much appreciate any thoughts on 2 issues.
Firstly, I want to reproduce some minimization results conducted in MATLAB. I have suceeded with nlm and optim-method CG. I have been told that I should get also with other optim methods. Actually, I found the same results when testing a very straightforward equation. However with a more complicated model it
2010 Jan 12
3
optim: abnormal termination in lnsrch (resend)
[sorry, forgot some details...]
I'm using optim(param, fun, method='L-BFGS-B', lower=lo, upper=up) to
minimize a certain function.
Often the minimization ends with the message:
ERROR: ABNORMAL_TERMINATION_IN_LNSRCH
What is optim() trying to say?
What have I to change in my function to make the minimization succeed?
Do you think using BBoptim() instead of optim() changes anything?
2004 Nov 29
1
authentication problem pam_mount
The setup is a samba server with mixed clients (samba clients and
windows clients).
The problem,
I want the linux client to mount there home to their home share on the
server. The problem is, I have followed the guide mentioned below and
everything works except that the linux usernames have the format
domeinnaam+username as a result of which pam_mount wants to mount
2006 Jan 16
0
R function for Gap statistic
Dear All,
I need to calculate the optimal number of clusters for a classification
based on a large number of observations (tens of thousands). Thibshirani et
al. proposed the gap statistic for this purpose. Is any R code or fucntion
available for this? Any help would be appreciated, including suggestions
about other alternatives for the selection of an optimal number of cluster
from large
2004 Jan 05
3
optim function : "BFGS" vs "L-BFGS-B"
Dear kind R-experts.
Does anybody have an experience to use optim function?
If yes, what is the main difference between two method "BFGS" vs
"L-BFGS-B"?
I used "BFGS" method and got what I wanted. But when I used "L-BFGS-B"
the error message said that "L-BFGS-B needs finite values of fn". So
that means
"BFGS" method can handle even if fn