search for: mu_

Displaying 18 results from an estimated 18 matches for "mu_".

Did you mean: mmu_
2012 Apr 16
1
eval a SYMSXP from C
...foo <- function(x,mu) { attr(x,"mu") <- substitute(mu) x } mu <- 2.0 xn <- foo(rnorm(100),mu) > typeof(attr(xn,"mu")) [1] "symbol" > eval(attr(xn,"mu")) [1] 2 > In a .Call, I am attempting to eval the SYMSXP as follows: SEXP mu_ = Rf_getAttrib(x_,Rf_install("mu")); if(TYPEOF(mu_)==SYMSXP) { mu_ = Rf_eval(Rf_lang1(mu_),R_GlobalEnv); } However, when running this code, I get the following error: Error in logp(xn) : could not find function "mu" Do I need to create an expression of c("get", &q...
2009 Oct 17
2
Recommendation on a probability textbook (conditional probability)
...independent random variables and their distributions are known. Now, I want to compute E(X | Z = z). 2.Suppose that I have $I \times J$ random number in I by J cells. For the random number in the cell on the i'th row and the j's column, it follows Poisson distribution with the parameter $\mu_{ij}$. I want to compute P(n_{i1},n_{i2},...,n_{iJ} | \sum_{j=1}^J n_{ij}), which the probability distribution in a row conditioned on the row sum. Some book directly states that the conditional distribution is a multinomial distribution with parameters (p_{i1},p_{i2},...,p_{iJ}), where p_{ij} = \mu...
2010 Jun 08
0
GMM: "The covariance matrix of the coefficients is singular"
...ng this message? Any ideas on how to get rid of it? My code: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Function 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-1...
2006 Oct 05
2
Writing Text into Plots
....0, expression(alpha == beta)) I know there exists a lot more like frac(), etc which could be used for expression. But a help(frac) doesn't return any results - where do I have to look for a documentation of possible text commands? More in detail I'm searching for how to set an index like mu_{1} and mu_{2} ? And how to get something like a bar over a character like \bar x ? TIA, Lothar -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFJWX0HRf7N9c+X7sRAtyiAJ4yssSZtt/DGzWVTfVI2qvzoO9FigCfe7Fm NTOUZN7j...
2009 Nov 15
2
lme model specification
.... . . . . . 2000 4 1 2.48 2000 4 2 3.93 2000 4 3 5.17 that is, I have data Y_{gtr} for g (gene) =1,...,2000 t (treatment) = 1,...,4 and r (replicate) = 1,...,3 I would like to fit the following linear mixed model using lme Y_{gtr} = \mu_{g} + W_{gt} + Z_{gtr} where the \mu_{g}'s are fixed gene effects, W_{gt} ~ N(0, \sigma^{2}) gene-treatment interactions, and residual errors Z_{gtr} ~ N(0,\tau^{2}). (Yes, I know I'm specifying an interaction between gene and treatment without specifying a treatment main effect ! - there...
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} 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}...
2011 Jan 03
0
Greetings. I have a question with mixed beta regression model in nlme (corrected version).
...eta 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} ~ 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} + 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...
2010 May 18
1
Maximization of quadratic forms
...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 spec...
2003 Mar 06
6
type III Sum Sq in ANOVA table - Howto?
Hello, as far as I see, R reports type I sums of squares. I'd like to get R to print out type III sums of squares. e.g. I have the following model: vardep~factor1*factor2 to get the type III sum of squares for factor1 I've tried anova(lm(vardep~factor2+factor1:factor2),lm(vardep~factor1*factor2)) but that didn't yield the desired result. Could anyone give me a hint how to proceed?
2002 Dec 10
1
autoregressive poisson process
Dear R users, I am trying to find a package that can estimate an autoregressive model for discrete data. I am imagining a Poisson or Gamma process in which the mean (say mu) follows a process such as mu_t = a + b*x + c*mu_{t-1} Suppose I have data on the time-series Poisson outcomes and x and would like to obtain ML estimates for b and c. Does anyone know of a package that can do this or something similar in R? My first (naive) instinct was to use glm and the lagged outcome as a regressor,...
2002 May 16
1
glm(y ~ -1 + c, "binomial") question
This is a question about removing the intercept in a binomial glm() model with categorical predictors. V&R (3rd Ed. Ch7) and Chambers & Hastie (1993) were very helpful but I wasn't sure I got all the answers. In a simplistic example suppose I want to explore how disability (3 levels, profound, severe, and mild) affects the dichotomized outcome. The glm1 model (see below) is
2004 Oct 08
1
nlme vs gls
...t to the list as I cannot turn up a solution anywhere else. I will frame it in the context of an R related issue. To illustrate the problem, consider student achievement test score data with multiple observations available for each student. One way of modeling these data might be Y_{ti} = (\mu + \mu_{i} ) + (\beta_0 + \beta_{i} )*(time) + \epsilon_{ti} ; t indexes time and i indexes student The nlme code is tt<-lme(reponse~time, data, random=~time|ID) With this, I can extract the growth rate for each individual in the data set. Conceptually this is the sum of the main effect for time plu...
2009 Apr 26
1
simulate arima model
I am new in R. I can simulate Arma, using Arima.sim However, I want to simulate an Arima Model. Say (1-B)Zt=5+(1-B)at. I do not know how to deal with 5 in this model. Can any one could help me? Thank you very much! Regards, -- View this message in context: http://www.nabble.com/simulate-arima-model-tp23239027p23239027.html Sent from the R help mailing list archive at Nabble.com.
2011 Sep 25
1
Question about syntax in lm function
I encounters some codes in ggplot2 manual and confused with one of its lm syntax. The code is here: library(ggplot2) d <- subset(diamonds, carat < 2.5 & rbinom(nrow(diamonds), 1, 0.2) == 1) d$lcarat <- log10(d$carat) d$lprice <- log10(d$price) detrend <- lm(lprice ~ lcarat, data = d) d$lprice2 <- resid(detrend) mod <- lm(lprice2 ~ lcarat * color, data = d) # *** what
2011 Nov 08
2
why NA coefficients
Hi, I am trying to run ANOVA with an interaction term on 2 factors (treat has 7 levels, group has 2 levels). I found the coefficient for the last interaction term is always 0, see attached dataset and the code below: > test<-read.table("test.txt",sep='\t',header=T,row.names=NULL) > lm(y~factor(treat)*factor(group),test) Call: lm(formula = y ~ factor(treat) *
2001 Nov 14
0
OPEN ssh pkg
...,9(;.,:"83=IS'Y2YQGG.92^9W1:<1:/,8PNGW-^0/=]Z\@ ,"JZ,% MJ[Y%( =) B]"<BNU<6U$:(2#A=+59Z7WMZAVZJ20*JEIJ[[DKE94L!W,H<?7 MENY\J#:**G$FYAQR#BBVE01+ 5;IK9%*6$+=YQ?N_FK\GL8=[+R# [W#@[%P MP9"MK@ U2P("[Z^(8?!"2[!;"KP+W_!(H[\F(FD( 87,4?%,<?'+X9)8NO%T MU_$D:\=J1010N1LH7WD9$BO=L?-J#/1L._19&0)N*19XG_=ZO_=\W_=^__> M'_B"/_A>4>5>SAS9F^6$O_@,<1$980,TP!(G$1(C 1(F<1(PH!,:T1([ 0,T M$ ,P,0,P,!(Q$/FE[Q&,G_H^D2='D10GC/<*=V1A<14RD!4?L16JG_NZW_=D M at 8-KX8^086:=>'H at H 0N, 1A0%=WR09 ( ;[Q' \Y@)U\$^ESQM:N!...
2008 Jun 30
4
Rebuild of kernel 2.6.9-67.0.20.EL failure
Hello list. I'm trying to rebuild the 2.6.9.67.0.20.EL kernel, but it fails even without modifications. How did I try it? Created a (non-root) build environment (not a mock ) Installed the kernel.scr.rpm and did a rpmbuild -ba --target=`uname -m` kernel-2.6.spec 2> prep-err.log | tee prep-out.log The build failed at the end: Processing files: kernel-xenU-devel-2.6.9-67.0.20.EL Checking
2003 Dec 01
0
No subject
...einen Ausdruck bekommen. Fine, dann bist Du fast fertig! Wenn Du gl|ck hast gibt's irgendwo auf dem System ein smbprint skript, das die smbclient-Befehlszeile enthdlt und das Du an Dein System anpassen kannst. Dieses dann als if= in die printcap Eintragen mit lp=/dev/null. Wenn Du noch filtern mu_t, dann mu_t Du Filter und smbprint kombinieren. Bischen Trickreich kann es mit der Zugangsberechtigung f|r den Drucker werden (welcher NT Benutzer, ...). Wenn Du in einer Domdne arbeitetst kann die -W Option von smbclient sinnvoll sein. Wundert mich, das das SuSE-GUI das nicht fertig anbietet. Im...