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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to