[R] Maximization of quadratic forms

Russell Shinohara rshinoha at jhsph.edu
Tue May 18 20:37:06 CEST 2010


Dear R Help,

I am trying to fit a nonlinear model for a mean function $\mu(Data_i, 
\beta)$ for a fixed covariance matrix where $\beta$ and $\mu$ are low- 
dimensional. More specifically, for fixed variance-covariance matrices  
$\Sigma_{z=0}$ and $\Sigma_{z=1}$ (according to a binary covariate $Z 
$), I am trying to minimize:

$\sum_{i=1^n} (Y_i-\mu_(Data_i,\beta))' \Sigma_{z=z_i}^{-1} (Y_i- 
\mu_(Data_i,\beta))$

in terms of the parameter $\beta$. Is there a way to do this in R in a  
more stable and efficient fashion than just using a general  
optimization function such as optim? I have tried to use gnls, but I  
was unsuccessful in specifying different values of the covariance  
matrix according to the covariate $Z$.

Thank you very much for your help,
Taki Shinohara



----

Russell Shinohara, MSc
PhD Candidate and NIH Fellow
Department of Biostatistics
Bloomberg School of Public Health
The Johns Hopkins University
615 N. Wolfe St., Suite E3033
Baltimore, MD 21205
tel: (203) 499-8480
http://biostat.jhsph.edu/~rshinoha



More information about the R-help mailing list