search for: sigma_i

Displaying 12 results from an estimated 12 matches for "sigma_i".

Did you mean: sigma_j
2009 Aug 07
1
Gauss-Laguerre using statmod
I believe this may be more related to analysis than it is to R, per se. Suppose I have the following function that I wish to integrate: ff <- function(x) pnorm((x - m)/sigma) * dnorm(x, observed, sigma) Then, given the parameters: mu <- 300 sigma <- 50 m <- 250 target <- 200 sigma_i <- 50 I can use the function integrate as: > integrate(ff, lower= -Inf, upper=target) 0.002169851 with absolute error < 4.4e-05 I would like to also use Gauss-Laguerre methods to also integrate this function. In doing so, I believe the only change of variable needed when integrating fro...
2006 Feb 10
1
Lmer with weights
...chools data by Gelman from R2WinBUGS package. As you can see bellow use of weights argument did not had influence on results. I do not know if my specification of weights i.e. 1 / sd^2 is ok. Under least squares one minimizes sum(e^2_i) or sum(w_i * e^2_i) with weighted LS. If I consider that \sigma_i represents uncertainty in my "data" then e'_i = e_i / \sigma_i and we minimize sum(e'^2_i) = sum((e_i / \sigma_i)^2) = sum(e_i * \sigma^-2_i). Therefore weights i.e. w_i are equal to 1 / \sigma^2_i. Can anyone help me with this issue? Thank you very much! > library(&quot...
2023 Nov 08
1
Problem in R code
Good afternoon, I have been working on my thesis project on the topic "Urban Heat Island Pattern in India". To achieve the results I am applying a* two-dimensional Gaussian fit* on an LST raster of 1 km spatial resolution but I am facing two errors in the following code. library(raster) LST <- raster("D:/Celsius_Day/MOD_01.tif") gaussian2d <- function(x, y, mu_x, mu_y,
2009 Mar 25
1
intelligent optimizer (with domain restrictions?)
...onstant auto-coefficient across units can describe the data. that is, I want to find out whether x(i,t)= a + b(i) + c*x(i,t-1) is better replaced by x(i,t)=a + b(i) + c(i)*x(i,t-1). right now, I am running N OLS TS regression of x on lagged x, and am picking off the mean(c), sd(c), and mean(sigma_i) and sd(sigma_i). if there is a procedure in R that already does a test for heterogeneous autocorrelation coefficients in a more intelligent fashion, please please point me to it. however, even if this exists, I think I need to figure out how to find a more graceful optimizer anyway. [[al...
2010 Aug 02
2
Dealing with a lot of parameters in a function
Hi all, I'm trying to define and log-likelihood function to work with MLE. There will be parameters like mu_i, sigma_i, tau_i, ro_i, for i between 1 to 24. Instead of listing all the parameters, one by one in the function definition, is there a neat way to do it in R ? The example is as follows: ll<- function(mu1=-0.5,b=1.2,tau_1=0.5,sigma_1=0.5,ro_1=0.7) { if (tau1>0 && ro<1 && ro>-1...
2007 Jun 25
3
Bug in getVarCov.gls method (PR#9752)
...uld be rewritten to work correctly. >> > > >> > >- Mary >> > > >> > >Andrzej Galecki (agalecki at umich.edu) writes: >> > > > Hi Mary, >> > > > >> > > > Our question is about variance-covariance matrix, hat(sigma_i), >> > > > returned by getVarCov() function when applied to model fit generated by >> > > > gls( ) function. It appears that at least in our example the returned >> > > > matrix was incorrect. Are you aware of any problem with getVarCov () >> >...
2017 Aug 10
1
"Help On optim"
...the above data frame represent the segment and each segment contain two-mixture component. (Latter I will increase the segment and the mixture component) So for every segment with n mixture component I have to find the *max f(x) with ?infinity < x < infinity* *f(x)=sum_i c_i N(O,mu_i,sigma_i). * *Since i need to calculate the derivate f? and set f?(x)=0 I thought of using Newton method * *In R the function I selected for my problem is optim.* *Below is my code * *l = 2 # represent the number of mixture component* *i=1# represent the segment 1 if i=2 represent the 2 se...
2011 Nov 12
1
State space model
...sition eq y_t+h = (I -exp(-hL))theta + exp(-hL)y_t+ eta_{t+h}. The problem is that the distribution of the innovations of the transition equation depend on the previous value of the state variable. To be exact: y_t|y_{t-1} ~N(mu, Q_t) where Q is a diagonal matrix with elements equal to Q_{i,t} = sigma_i*(1-exp(-kappa_i*h)/kappa_i*(theta_i/2*(1-exp(kappa_i*h)+exp(-kappa_i*h)y_{t-1,i} The fkf returns the filtered states variables so y_{t-1,i} is available. I just can't figure out how to write my program in such a way that this information is included and updated in the state space model for ea...
2009 Sep 24
0
basic cubic spline smoothing (resending because not sure about pending)
...e written in c++, so I would like to match the results with R (for my unit tests). I am following Smoothing Splines, D.G. Pollock (available online) where we have a list of points (xi, yi), the yi points are random such that: y_i = f(x_i) + e_i where e_i is normal with mean 0 and variance sigma_i^2 There is a smoothing parameter lambda between 0 and 1. .when lambda is 0, smoothness is all that matters, and the fitting function will be a straight line. .when lambda is 1, the result is the interpolating spline. In my case, this parameter is an input. The resulting function is the spline...
2012 Mar 24
0
NLME error model with several responses
...ackage for R to modeling glucose-insuline response with Bergman's model, very similar to the example in the documentation for the NLME package. My question concerns the model for the residuals. I use a proportional model , Var(e_{ij})=(sigma_g*G(t))^2 for the glucose response and Var(e_{ij})=(sigma_i * I(t))^2 for the insulin response. Hence I have a varPower model, but I know that the power coefficient is 2, but with different sigma coefficients for the two responses. If I fit a model I get an estimation of the standard deviation of the residuals, which directly can be obtained from the outpu...
2009 Sep 24
1
basic cubic spline smoothing
...itten in c++, so I would like to match the results with R (for my unit tests) I am following http://www.nabble.com/file/p25569553/SPLINES.PDF SPLINES.PDF where we have a list of points (xi, yi), the yi points are random such that: y_i = f(x_i) + e_i where e_i is normal with mean 0 and variance sigma_i^2 There is a smoothing parameter lambda between 0 and 1. .when lambda is 0, smoothness is all that matters, and the fitting function will be a straight line. .when lambda is 1, the result is the interpolating spline. In my case, this parameter is an input. The resulting function is the spline...
2007 May 08
2
statistics/correlation question NOT R question
This is not an R question but if anyone can help me, it's much appreciated. Suppose I have a series ( stationary ) y_t and a series x_t ( stationary )and x_t has variance sigma^2_x and epsilon is normal (0, sigma^2_epsilon ) and the two series have the relation y_t = Beta*x_t + epsilon My question is if there are particular values that sigma^2_x and sigma^2_epsilon have to take in