similar to: Maximization of quadratic forms

Displaying 20 results from an estimated 200 matches similar to: "Maximization of quadratic forms"

2006 Jul 24
5
change the name of file
Dear R Users, Is it possible to make file names dependent on a changing variable? For instance. I generate random numbers in a loop and at each iteration I want data to write to file (I do not want to write everything in one file using 'append'): for (i in 1:50){ x<-matrix(runif(100, min=0,max=1),nrow=5,ncol=20) Write(t(x),file="Data_i.txt",ncolumns=5,sep="\t") }
2010 Nov 06
4
Using changing names in loop in R
Hello everybody, I have usually solved this problem by repeating lines of codes instead of a loop, but it's such a waste of time, I thought I should really learn how to do it with loops: What I want to do: Say, I have several data files that differ only in a number, e.g. data points (or vector, or matrix...) Data_1, Data_2, Data_3,... and I want to manipulate them e.g. a simple sum of
2011 Jan 03
1
Greetings. I have a question with mixed beta regression model in nlme.
*Dear R-help: My name is Rodrigo and I have a question with nlme package in R to fit a mixed beta regression model. The details of the model are: Suppose that:* *j in {1, ..., J}* *(level 1)* *i in {1, ..., n_j}* *(level 2)* *y_{ij} ~ Beta(mu_{ij} * phi_{ij}; (1 - mu_{ij}) * phi_{ij}) y_{ij} = mu_{ij} + w_{ij} * *with* *logit(mu_{ij}) = Beta_{0i} + Beta_{1i} * x1_{ij} + b2 * x2_{ij}
2011 Jan 03
0
Greetings. I have a question with mixed beta regression model in nlme (corrected version).
*Dear R-help: My name is Rodrigo and I have a question with nlme package in R to fit a mixed beta regression model. I'm so sorry. In the last email, I forgot to say that W is also a unknown parameter in the mixed beta regression model. In any case, here I send you the correct formulation. ** Suppose that:* *j in {1, ..., J}* *(level 1)* *i in {1, ..., n_j}* *(level 2)* *y_{ij} ~
2004 Jul 29
2
expression + paste + arguments + ...
dear R wizards: I would like to write a function that roughly places the equivalent of the following latex text into the current plot: \newcommand{ \placesigma }[4]{ \put(\#1,\#2){ \sigma_{A , #3} = #4 } I cannot figure out how to do this. I know I have to use a function that uses expressions in a text() invoke. But passing arguments and nesting strings and expressions has so far not
2008 Aug 29
3
extract variance components
HI, I would like to extract the variance components estimation in lme function like a.fit<-lme(distance~age, data=aaa, random=~day/subject) There should be three variances \sigma_day, \sigma_{day %in% subject } and \sigma_e. I can extract the \sigma_e using something like a.fit$var. However, I cannot manage to extract the first two variance components. I can only see the results in
2011 Sep 13
2
Mathematical expressions in the group labels in lattice
Hi, I am working with the lattice package and I want to label to groups in the xyplots with mathematical expressions. I short example for this library(lattice) Case<-factor(rep(1:2,each=300)) xx<-rnorm(600,0,1) yy<-rnorm(600,0,1) xyplot(yy~xx|Case) This results in two scatter plots with label "1" and "2". I would like to substitute this labels by math expression. I
2009 Jun 19
1
using garchFit() to fit ARMA+GARCH model with exogeneous variables
Hello - Here's what I'm trying to do. I want to fit a time series y with ARMA(1,1) + GARCH(1,1), there are also an exogeneous variable x which I wish to include, so the whole equation looks like: y_t - \phi y_{t-1} = \sigma_t \epsilon_t + \theta \sigma_{t-1} \epsilon_{t-1} + c x_t where \epsilon_t are i.i.d. random variables \sigma_t^2 = omega + \alpha \sigma_{t-1}^2 + \beta
2007 Apr 22
1
labels
Hello, I would like to add to axis labels special caracters. Instead of writing :plot(simul, xlab="beta", ylab="sigma11") It would be great if I could write something as in LaTeX :plot(simul, xlab="\beta", ylab="\sigma_{11}") Is there a way to do that ? Thank you _________________________________________________________________ ues clics pour retrouver tout
2002 Feb 20
2
How to get the penalized log likelihood from smooth.spline()?
I use smooth.spline(x, y) in package modreg and I would like to get value of penalized log likelihood and preferable also its two parts. To make clear what I am asking for (and make sure that I am asking for the right thing) I clarify my problem trying to use the same notation as in help(smooth.spline): I want to find the natural cubic spline f(x) such that L(f) = \sum_{k=1}{n} w[k](y[k] -
2008 Nov 14
1
aov help
Please pardon an extremely naive question. I see related earlier posts, but no responses which answer my particular question. In general, I'm very confused about how to do variance decomposition with random and mixed effects. Pointers to good tutorials or texts would be greatly appreciated. To give a specific example, page 193 of V&R, 3d Edition, illustrates using raov assuming pure
2010 Apr 13
1
WinBUGS Question
Hi: Is there a way we can set up WINBUGS to run 100 simulated datasets on the same model and output results? Or do we have to call in each dataset at a time and repeat the process 100 times manually? Thanks Anamika [[alternative HTML version deleted]]
2010 Oct 27
1
GLM and Weights
Dear all, I am trying to use the 'glm' package as part of a semiparametric technique that involves weighting a likelihood in various ways, i.e. L(theta;data)=Sum_i=1,..,n (W_i)(log L(theta;data_i)) Where W_i can be a kernel weighting function, or W_i can be an indicator of 'non-missingness' divided by a propensity score. In a Monte Carlo exercise, the option glm(...,
2010 Apr 12
1
lattice garphs: combining multiple scatterplots and adding legend
Dear List members, its me again, fighting with lattice graphics. I am trying to plot a world map, add some points on different locations with different colors and add a legend, but did not succeed yet with the legend. Here is my code: library(fields) # Data for demonstration data_x = c(0,50,60) data_y = c(0,0,0) cols???= c(1,2,3) data(world.dat) #print map all=xyplot(world.dat$y? ~
2005 Sep 04
3
Nokia 32 Terminal
Hi, Does anyone have some experience with Nokia 32 Terminal (it is an analog GSM Gateway)? After a configuration I can make only incoming calls, I'm not able to do any outgoing. Nokia signalize an error (4 short tones), when I try to phone someone. I tried postpaid simcards as well as prepaid simcards with the same result. Does anyone try to connect this gateway to Asterisk PBX if so what
2004 Oct 06
0
quadratically constrained quadratic programming
Hi, Does anybody have experience to solve an quadratic programming problem with quadratic constraints in R? It seems that the package "quadprog" only handles the quadratic programming with linear constraint. My probelm is to maximze x^T\Sigma_{xy} y, subject to x^Tx=1, y^T\Sigma_{yy} y=1, and sum(y)<t, or sum(y)=t, where x and y are the variable, and the Sigma's and t are
2005 Dec 29
0
calculating recursive sequences
Hi, I was trying to repeat the estimation of threshold GARCH models from the book "Analysis of Financial Time Series" by Ruey S. Tsay, and I was succesfull, but I had to use "for" loop, which is quite slow. The loop is necessary, since you need to calculate recursive sequence. Is there a faster way to do this in R, without using loops? The model is such: r_t = \mu + \alpha_2
2008 Aug 07
3
Create new dataframes with dames from dataset...
Hi I'm wondering if you could save new data frames with in a loop using the names within the data frame... I.e. If you have a data frame as below Product Type Test A One 67 A Two 55 B One 42 A One 55 I would like to generate new dataframes as follow... A.One (including) A One 67 A One 55 A.Two (including) A
2012 Apr 16
1
eval a SYMSXP from C
Can someone offer some advice on how to properly evaluate a SYMSXP from a .Call ? I have the following in R: variable xn, with an attribute "mu" which references the variable mu in the global environment. I know "references" is a loose term; mu was defined in this fashion as a way to implement deferred binding: foo <- function(x,mu) { attr(x,"mu") <-
2003 Dec 10
3
pridump
Hi All, Can anyone tell me what are the <dev1> <dev2> parameters that I should use to run pridump? I took a look at the source code but couldn't figure this one out. Best, PauloHM