search for: sigma_

Displaying 20 results from an estimated 26 matches for "sigma_".

Did you mean: sigma
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 summary(a.fit). I have some problem in the lme4 package and hence use the nlme package. The...
2010 Jun 08
0
GMM: "The covariance matrix of the coefficients is singular"
...ction g, where E[g]=0: g <- function(theta,x){ N <- length(x) #Transform parameters in order to make them x>0, x<0 or 0<x<1 a <- exp(theta[1]) b <- -exp(theta[2]) mu_s <- exp(theta[3]) prob <- exp(theta[4])/(1+exp(theta[4])) sigma <- exp(theta[5]) sigma_s <- exp(theta[6]) nt1 <- diff(x) - a - b*x[-N] m1 <- nt1 m2 <- nt1^2 - (sigma^2-2*prob*(mu_s^2+sigma_s^2))/(1-2*prob) m3 <- nt1^3 m4 <- nt1^4 - (-2*prob*mu_s^4-12*mu_s^2*sigma_s^2*prob+3*sigma^4-6*prob*sigma_s^4)/(1-2*prob) m5 <- nt1^5 m6 <- nt1^6 - (...
2011 Jan 03
1
Greetings. I have a question with mixed beta regression model in nlme.
...+ b2 * x2_{ij} log(phi_{ij}) = Gamma_{0i} + Gamma_{1i} * z1_{ij} + c2 * z2_{ij} * *Beta_{0i} = b_0 + u_{0i} Beta_{1i} = b_1 + u_{1i} Gamma_{0i} = c_0 + v_{0i} Gamma_{1i} = c_1 + v_{1i} * *The vector* *(u_{0i}, u_{1i})'* *has normal distribution with mean* *(0, 0)'* *and covariance matrix* *sigma_{00} sigma_{01} sigma_{10} sigma_{11} * *The vector* *(v_{0i}, v_{1i})'* *has normal distribution with mean* *(0, 0)'* *and covariance matrix* *delta_{00} delta_{01} delta_{10} delta_{11} * *The* *w_{ij}s are independents. Each* *w_{ij}* *has mean* *0* *and variance * *W*. *The unknown par...
2011 Jan 03
0
Greetings. I have a question with mixed beta regression model in nlme (corrected version).
...b_2 * x2_{ij} log(phi_{ij}) = Gamma_{0i} + Gamma_{1i} * z1_{ij} + c_2 * z2_{ij} * *Beta_{0i} = b_0 + u_{0i} Beta_{1i} = b_1 + u_{1i} Gamma_{0i} = c_0 + v_{0i} Gamma_{1i} = c_1 + v_{1i} * *The vector* *(u_{0i}, u_{1i})'* *has normal distribution with mean* *(0, 0)'* *and covariance matrix* *sigma_{00} sigma_{01} sigma_{10} sigma_{11} * *The vector* *(v_{0i}, v_{1i})'* *has normal distribution with mean* *(0, 0)'* *and covariance matrix* *delta_{00} delta_{01} delta_{10} delta_{11} * *The* *w_{ij}s are independents. Each* *w_{ij}* *has mean* *0* *and variance * *W*. *The unknown par...
2010 May 18
1
Maximization of quadratic forms
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 ju...
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 worked for me. I hope this is an obvious question---if not, please just tell me and I can giv...
2011 Sep 13
2
Mathematical expressions in the group labels in lattice
...m(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 used the following code Case<-factor(rep(1:2,each=300)) levels(Case) <- c(expression(R^2),expression(sigma_[i])) xx<-rnorm(600,0,1) yy<-rnorm(600,0,1) xyplot(yy~xx|Case) But the label did not change to mathematical expressions. Any ideas? Thank you very much for your help. [[alternative HTML version deleted]]
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 y_{t-1}^2 I looked through documentation of garchFit() from the fGarch library but didn't find a way to include exogeneous variabl...
2005 Jun 04
1
can R do Fixed-effects (within) regression (panel data)?
...9476 .0712293 1.29 0.197 -.0476592 .2315544 d87 | .1349289 .0813135 1.66 0.097 -.0244427 .2943005 _cons | .0235864 .1506683 0.16 0.876 -.271718 .3188907 -------------+---------------------------------------------------------------- sigma_u | .32460315 sigma_e | .35099001 rho | .46100216 (fraction of variance due to u_i) 2) can R do Fixed-effects (within) regression as Stata's xtreg? the followng example is from "Introductory Econometrics: A Modern Approach" by Jeffrey M. Wooldridge Chapter 14...
2011 Dec 17
0
time-varying parameters kalman filter estimation problem using FKF package
...ata matrix Z <- cbind(1, as.vector(data[,2])) y <- as.matrix(data[,1],nrow = 1, ncol = length(y)) # format Z into an array Zt <- array(NA,c(1,2,nrow(Z))) for(i in 1:nrow(Z)) { Zt[,,i] <- Z[i,] } # specify state-space form of the time-varying capm capm.ss <- function(alpha,beta,sigma_e,sigma_n1,sigma_n2) { Tt <- diag(1,2) Zt <- Zt ct <- matrix(0) dt <- matrix(0,nrow = 2, ncol = 1) GGt <- matrix(sigma_e^2) HHt <- diag(c(sigma_n1^2,sigma_n2^2),2) a0 <- c(0,0) P0 <- diag(10^6,2) return(list(a0 = a0, P0 = P0, ct = ct, dt = dt, Zt = Zt, Tt = Tt, GG...
2004 Apr 05
3
2 lme questions
Greetings, 1) Is there a nice way of extracting the variance estimates from an lme fit? They don't seem to be part of the lme object. 2) In a series of simulations, I am finding that with ML fitting one of my random effect variances is sometimes being estimated as essentially zero with massive CI instead of the finite value it should have, whilst using REML I get the expected value. I guess
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 know. Can R slove this problem, or do you know any other Fortran or C subroutine I can load into R to solve this problem? Thanks in advance, Jianhui
2005 Dec 29
0
calculating recursive sequences
...s" 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 r_{t-2} + a_t a_t = \sigma_t\varepsilon_t \sigma_t^2 = \beta_1a_{t-1}^2+\beta_2\sigma_{t-1}^2+ 1_{\{a_{t-1}>0\}}(\gamma_0+ \gamma_1a_{t-1}^2+\gamma_2\sigma^2_{t-1}) It is asummed that \varepsilon_t are iid and normal with zero mean and variance one. The data given is r_t, and you have to estimate variables, \mu, \alpha,...
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 ce qui vous intéresse au même endroit. [[alternative HTML version deleted]]
2002 Feb 20
2
How to get the penalized log likelihood from smooth.spline()?
...lambda J(f) is minimized, where J(f) := \int f''(t)^2 dt is the quadratic roughness functional use. Since J(f) is quadratic one can find a matrix \Sigma such that J(g) = c^T{\Sigma}c where c is the vector of spline coefficients. With J(f) defined as above the elements of \Sigma becomes \Sigma_{ij} = \int \beta_i''(t)\beta_j''(t) dt where \beta(t) is the vector of B-spline base functions. Finally, writing the matrix W as W := diag(\sqrt{w}) one can write L(f) as L(f) = (y - f)^T W^2 (y - f) + \lambda c^T{\Sigma}c which is the form used in help(smooth.spline). So back...
2008 Nov 14
1
aov help
...tr.helmert", "contr.poly")) > aov(Conc ~ Lab + Error(Lab / Bat), data=coop, subset = Spc=="S1") However, as shown in V&R, raov also equated the expected and observed mean squares, to solve for and display the variance components associated with the random factors, \sigma_\epsilon^2, \sigma_B^2, and \sigma_L^2 in a column labeled "Est. Var.". Given the analytical forms of the expected mean squares for each stratum, I can obviously do this manually. But is there way to get R to do it automatically, a la raov? This would be particularly useful for mixed c...
2006 Oct 24
1
Variance Component/ICC Confidence Intervals via Bootstrap or Jackknife
...But the few references I've been able to track down (Arvesen, Biometrcs, 1970 is one), seem to say that I should just sample with replacement the i units. Plus they seem to indicate that a log transform is needed. The Arvesen reference used something like using log(v_a/v_e) as an estimator for sigma_a^2/sigma_e^2 and getting an interval and then transforming to get to an interval for the ICC (although it's not clear to me how to get the other ICC in a two-level nested design). Any insights would be appreciated. Rick B.
2011 Oct 04
1
F-values in nested designs
Hello all I'm trying to learn how to fit a nested model in R. I found a toy example on internet where a dataset that have?3 areas and 4 sites within these areas. When I use Minitab to fit a nested model to this data, this is the ANOVA table that I got: Nested ANOVA: y versus areas, sites Analysis of Variance for y Source DF SS MS F P areas 2 4.5000 2.2500
2010 Jun 09
1
equivalent of stata command in R
....0013978 -22.73 0.000 -.034508 -.0290287 _Iyear_1999 | -.0647261 .0027674 -23.39 0.000 -.0701501 -.0593021 _cons | 1.802112 .009304 193.69 0.000 1.783876 1.820348 -------------+---------------------------------------------------------------- sigma_u | .38142386 sigma_e | .2173114 rho | .75494455 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(48854, 97301) = 3.30 Prob > F = 0.0000 3. Compute marginal e...
2010 Jun 09
1
equivalent of stata command in R‏
...0013978 -22.73 0.000 -.034508 -.0290287 _Iyear_1999 | -.0647261 .0027674 -23.39 0.000 -.0701501 -.0593021 _cons | 1.802112 .009304 193.69 0.000 1.783876 1.820348 -------------+---------------------------------------------------------------- sigma_u | .38142386 sigma_e | .2173114 rho | .75494455 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(48854, 97301) = 3.30 Prob > F = 0.0000 3. Compute mar...