Displaying 20 results from an estimated 90 matches similar to: "minimisation problem, two setups (nonlinear with equality constraints/linear programming with mixed constraints)"
2005 Jul 06
2
Problem with dyn.load...or else...
Hi everybody,
I'm working on Mac OS X and R-2.1.0 (by the way, sorry for the multiple
emails last time, had a technical problem, and thanks for the constructive
comments.)
I have a .R function which calls a .C function. The R function's name is
K_MEANSR.R and the other is K_MEANSC.C.
I compile it with 'R CMD SHLIB K_MEANSC.C' in the terminal. I get both .so
and .o files.
2004 Apr 27
1
beginners k means clustering question
Hi all,
I am wandering.. is it possible to cluster data which is in a single
column ?
for example.. I have some data as follows:
4013
7362
7585
9304
11879
14785
21795
30500
30669
30924
33988
36975
40422
42911
50501
51593
53729
54338
55497
57337
61993
62601
66229
69815
69933
70760
71340
75921
83972
90134
91061
.
.
.
is it possible to cluster this data since it is in a single column ?
I have
2009 Jul 31
2
another automation question
This code works:
x<-letters[1:6]
ycols<-23:28
xcols<-rep(c(3,4,5,8),each=length(ycols))
somertime<-function(i,j)somers2(Pred_pres_a_indpdt[,i,,], population[,j])
results<-mapply(somertime,xcols,ycols)
How can I make variable "h" work?
x<-letters[1:6]
ycols<-23:28
xcols<-rep(c(3,4,5,8),each=length(ycols))
1999 Feb 08
0
Constrained minimisation
Hi
Apart from nlm() with the stepmax= argument, is there any other >1
dimensional minimisation function where I can limit the step size
dynamically. With the NAG routine E04NBF (I think) I used to bound the
size of the next step using a*arctan(x/a) tricks where a function was
particularly difficult near a boundary and thus 'steer' the result within
legal limits.
The function I am
2002 Jan 24
2
general minimisation function
Dear R users,
I am searching for a general minimisaton function like 'ms' in R.
Please give me a hint!
--
------------------------------------------------------------
Dipl. Inform. J. Hedderich
Institut f?r Medizinische Informatik
und Statistik im Klinikum an der CAU
Phone : 0431/5973182
Brunswiker Str. 10
2007 Oct 16
2
How to speed up multiple for loop over list of data frames
Hi there,
I have a multiple for loop over a list of data frames
for ( i in 1:(N-1) ) {
for ( j in (i+1):N ) {
for ( p in 1:M ) {
v_i[p] = alist[[p]][i,"v"]
v_j[p] = alist[[p]][j,"v"]
}
rho_s = cor(v_i, v_j, method = "spearman")
rho_p = cor(v_i, v_j, method = "pearson"
2005 May 02
14
eigenvalues of a circulant matrix
Hi,
It is my understanding that the eigenvectors of a circulant matrix are given as
follows:
1,omega,omega^2,....,omega^{p-1}
where the matrix has dimension given by p x p and omega is one of p complex
roots of unity. (See Bellman for an excellent discussion on this).
The matrix created by the attached row and obtained using the following
commands
indicates no imaginary parts for the
2006 Jun 30
0
SAS Proc Mixed and lme
I am trying to use lme to fit a mixed effects model to get the same
results as when using the following SAS code:
proc mixed;
class refseqid probeid probeno end;
model expression=end logpgc / ddfm=satterth;
random probeno probeid / subject=refseqid type=cs;
lsmeans end / diff cl; run;
There are 3 genes (refseqid) which is the large grouping factor, with
2 probeids nested within each refseqid,
2009 Oct 24
1
dev.copy(postscript,...) generates a disrupted string
Dear R-Users,
I have the following problem: I would like to create a postscript file
containing an r-plot with the string "\\vartheta" in it (reason: this
is later converted to the TeX-string "\vartheta" and a vartheta is
printed in the figure). In the minimal example below, the problem is
that the created postscript file does _not_ contain the string "\\vartheta
2007 Oct 23
4
Replace values on seq
Hey guys, sorry for the inconvenience (this might be a hundred times
answered question), but I have been searching a while and gave up
about the following:
I have the following, table and data:
table <- seq(255, 0, by=-1)
data <- c(1,8,...) <--- doesn't matter what's in here
Which would be the most efficient way to replace each data value, v_i,
by table[v_i + 1] ?
And, maybe
2006 Jun 30
1
lme and SAS Proc mixed
I am trying to use lme to fit a mixed effects model to get the same
results as when using the following SAS code:
proc mixed;
class refseqid probeid probeno end;
model expression=end logpgc / ddfm=satterth;
random probeno probeid / subject=refseqid type=cs;
lsmeans end / diff cl; run;
There are 3 genes (refseqid) which is the large grouping factor, with
2 probeids nested within each refseqid,
2005 Feb 24
0
KalmanXXXX and deJong-Penzer statistic?
A question about: Kalman in R, time series and
deJong-Penzer statistic - how to compute it using
available artefacts of KalmanXXXXX?
Background. in the paper
http://www.lse.ac.uk/collections/statistics/documents/researchreport34.pdf
'Diagnosing Shocks in TIme Series', de Jong and Penzer
construct a statistic (tau) which can be used to
locate potential shocks. [p15, Theorem 6.1 and
2010 Feb 23
1
function on all pairs of vector entries
Hello all,
Is there a way in R to compute the multivariate normal density of every pair of entries in a vector efficiently instead of using for loop?
For example
Suppose I have a vector a=c(v_1,...,v_p)=c(0.5343909, -0.7784353, -0.0568370, 1.8772838, -1.3183407, 0.8227418,...)
I want to compute density(v_i, v_j) for every pair of entries (i,j) (i!=j) in a. The joint bivariate distribution
2007 Feb 28
1
Efficient way to repeat rows (or columns) of a matrix?
Hi.
If I have a vector, v_1, and another vector of positive integers, i_1, the
same length as v_1, then rep(v_1,i_1) will repeat v_i[j] exactly i_1[j]
times, like so:
>rep(c(1,2,3),c(3,2,1))
[1] 1 1 1 2 2 3
>
I'd like to do the same sort of thing where I replace v_1 with a matrix, and
the jth row of the matrix is repeated i_1 times.
Obviously, I could do this with for loops, like
2005 Sep 01
6
png scaling problem
scaling<-4
xywidth<-480
resolution<-150
png(filename = "c:/r/anschluss/plots/4.png", width = xywidth*scaling,
height = xywidth*scaling,pointsize = 12, bg = "white", res =
resolution*scaling)
......
barplot(xrow,col = barcolors,cex.axis=scaling, ylab="mean time till attachment in sec",cex.lab=1.2*scaling)
I tried to scale the barplot but there is one
2012 Feb 23
1
segfault when using data.table package in conjunction with foreach
Hi all,
I'm trying to use the package read.table within a foreach loop. I'm
grabbing 500M rows of data at a time from two different files and then
doing an aggregate/tapply like function in read.table after that. I
had planned on doing a foreach loop 39 times at once for the 39 files
I have, but obviously that won't work until I figure out why the
segfault is occurring. The
2008 Apr 23
1
Minimise a parameter of a given function f, with f > 0
Hi,
I need to find the minimum value of the parameter, s, such that the function
f(s,t) > 0 (where -Inf < t < Inf)
I've looked into optim, constrOptim and others but they don't seem to do
this. Des anyone have some suggestions?
Thanks in advance.
[[alternative HTML version deleted]]
2006 Oct 09
1
Metacity theme titlebar minimise button
Look at it, and you'll see the black outline is missing on the right
side of the minimise button. This has been bugging me for a while. I've
attached a zoomed in shot, so you can see easily what I mean. It's not a
bug in the theme, but in gtk-window-decorator's Metacity theme support,
as the border displays perfectly in Metacity. Does it happen with other
themes?
--------------
2008 Dec 16
1
Programmatically minimising main R window (on windows)
Hi all,
Is it possible to programmatically minimise the main window of the
windows R gui? I'm designing a small gui with gwidgets & RGtk2 for an
non-statistician to use, and it would be nice if I could easily hide
all the R stuff that they don't need.
Thanks,
Hadley
--
http://had.co.nz/
2005 Oct 09
1
Simple Sudoku - not minimising/letting me do anything else
I have installed Simple Sudoku (http://www.angusj.com/sudoku/index.php)
but I cannot minimise it, nor go to another screen to do something else.
If I try, its window gets larger, vertically.
I am using wine 20050725 (which is what is packaged for my system at
present), on a Debian system running XFree86, with icewm-gnome.
Can anyone advise why this program "hogs attention"?
--
Phil