similar to: within and between subject calculation

Displaying 20 results from an estimated 3000 matches similar to: "within and between subject calculation"

2005 Jun 15
2
need help on computing double summation
Dear helpers in this forum, This is a clarified version of my previous questions in this forum. I really need your generous help on this issue. > Suppose I have the following data set: > > id x y > 023 1 2 > 023 2 5 > 023 4 6 > 023 5 7 > 412 2 5 > 412 3 4 > 412 4 6 > 412 7 9 > 220 5 7 > 220 4 8 > 220 9 8 > ...... > Now I want to compute the
2009 Oct 17
2
Recommendation on a probability textbook (conditional probability)
I need to refresh my memory on Probability Theory, especially on conditional probability. In particular, I want to solve the following two problems. Can somebody point me some good books on Probability Theory? Thank you! 1. Z=X+Y, where X and Y are 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
2006 Dec 08
1
MAXIMIZATION WITH CONSTRAINTS
Dear R users, I?m a graduate students and in my master thesis I must obtain the values of the parameters x_i which maximize this Multinomial log?likelihood function log(n!)-sum_{i=1]^4 log(n_i!)+sum_ {i=1}^4 n_i log(x_i) under the following constraints: a) sum_i x_i=1, x_i>=0, b) x_1<=x_2+x_3+x_4 c)x_2<=x_3+x_4 I have been using the ?ConstrOptim? R-function with the instructions
2001 Oct 09
1
PROC MIXED user trying to use (n)lme...
Dear R-users Coming from a proc mixed (SAS) background I am trying to get into the use of (n)lme. In this connection, I have some (presumably stupid) questions which I am sure someone out there can answer: 1) With proc mixed it is easy to get a hold on the estimated variance parameters as they can be put out into a SAS data set. How do I do the same with lme-objects? For example, I can see the
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
2005 Jan 18
1
a question about linear mixed model in R
Dear all, I have a somewhat unusual linear mixed model that I can't seem to code in lme. It's only unusual in that one random effect is applied only to some of the observations (I have an indicator variable that specifies which observations have this random effect). The model is: X_hijk = alpha_h + h * b_i + r_(ij) + e_hijk , where h = 0 or 1 (indicator) i = 1, ..., N j = 1,
2002 Mar 29
1
help with lme function
Hi all, I have some difficulties with the lme function and so this is my problem. Supoose i have the following model y_(ijk)=beta_j + e_i + epsilon_(ijk) where beta_j are fixed effects, e_i is a random effect and epsilon_(ijk) is the error. If i want to estimate a such model, i execute >lme(y~vec.J , random~1 |vec .I ) where y is the vector of my data, vec.J is a factor object
2007 Aug 10
0
half-logit and glm (again)
I know this has been dealt with before on this list, but the previous messages lacked detail, and I haven't figured it out yet. The model is: \x_{ij} = \mu + \alpha_i + \beta_j \alpha is a random effect (subjects), and \beta is a fixed effect (condition). I have a link function: p_{ij} = .5 + .5( 1 / (1 + exp{ -x_{ij} } ) ) Which is simply a logistic transformed to be between .5 and 1.
2012 Oct 18
7
summation coding
I would like to code the following in R: a1(b1+b2+b3) + a2(b1+b3+b4) + a3(b1+b2+b4) + a4(b1+b2+b3) or in summation notation: sum_{i=1, j\neq i}^{4} a_i * b_i I realise this is the same as: sum_{i=1, j=1}^{4} a_i * b_i - sum_{i=j} a_i * b_i would appreciate some help. Thank you. -- View this message in context: http://r.789695.n4.nabble.com/summation-coding-tp4646678.html Sent from the R
2002 Feb 20
2
How to get the penalized log likelihood from smooth.spline()?
I use smooth.spline(x, y) in package modreg and I would like to get value of penalized log likelihood and preferable also its two parts. To make clear what I am asking for (and make sure that I am asking for the right thing) I clarify my problem trying to use the same notation as in help(smooth.spline): I want to find the natural cubic spline f(x) such that L(f) = \sum_{k=1}{n} w[k](y[k] -
2009 May 01
2
Double summation limits
Dear R experts I need to write a function that incorporates double summation, the problem being that the upper limit of the second summation is the index of the first summation, i.e: sum_{j=0}^{x} sum_{i=0}^{j} choose(i+j, i) where x variable or constant, doesn't matter. The following code obviously doesn't work: f=function(x) {j=0:x; i=0:j; sum( choose(i+j,i) ) } Can you help? Thanks
2006 Nov 03
5
ANOVA in Randomized-complete blocks design
Dear all, I am trying to repeat an example from Sokal and Rohlfs "Biometry" -- Box 11.4, example of a randomized-complete-blocks experiment. The data is fairly simple: series genotype weight 1 pp 0.958 1 pb 0.985 1 bb 0.925 2 pp 0.971 2 pb 1.051 2 bb 0.952 3 pp 0.927 3 pb 0.891 3 bb 0.892 4
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}
2011 Jan 03
0
Greetings. I have a question with mixed beta regression model in nlme (corrected version).
*Dear R-help: My name is Rodrigo and I have a question with nlme package in R to fit a mixed beta 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} ~
2000 Mar 28
1
the function lme in package nlme
Dear people, A somewhat clueless question follows: I just discovered that the lme function in contrib package nlme for R, while similar to the lme function in Splus, does not use the cluster function option. This difference does not appear to be documented in the V&R `R Complements' file. I have data which is divided into 6 groups The lme model is of the form (simplified from the actual
2007 Apr 12
1
LME: internal workings of QR factorization
Hi: I've been reading "Computational Methods for Multilevel Modeling" by Pinheiro and Bates, the idea of embedding the technique in my own c-level code. The basic idea is to rewrite the joint density in a form to mimic a single least squares problem conditional upon the variance parameters. The paper is fairly clear except that some important level of detail is missing. For
2010 Jul 03
1
Inverting a scale(X)
G'day, All. I have been trying to trackdown a problem in my R analysis script. I perform a scale() operation on a matrix then do further work. Is there any way of inverting the scale() such that sX <- scale(X) Xprime <- inv.scale(x); # does inv.scale exist? resulting in Xprime_{ij} == X_{ij} where Xprime_{ij} \in R There must be some way of doing it but I'm such a newb
2006 Apr 11
1
type II and III Sum square whit empty cells
Dear all I need to run an anova from a factorial model y_{ijk}=\alpha_i+\beta_j+(\alpha\beta)_{ij}+e_{ijk} and calculate type II and III sums of square, but I have an empty cells, so anova function from package car fail. (I believe) y<-c(7,13,6,10,8,11,8,3,7,5,65) a<-as.factor(c(1,1,2,2,3,3,3,1,1,1,2)) b<-as.factor( c(rep(1,7),rep(2,4)) ) table(b,a) # cell (2,3) is empty
2009 Apr 21
2
Changing the binning of collected data
Dear All, Apologies if this is too simple for this list. Let us assume that you have an instrument measuring particle distributions. The output is a set of counts {n_i} corresponding to a set of average sizes {d_i}. The set of {d_i} ranges from d_i_min to d_i_max either linearly of logarithmically. There is no access to further detailed information about the distribution of the measured sizes, but
2004 Apr 18
2
lm with data=(means,sds,ns)
Hi Folks, I am dealing with data which have been presented as at each x_i, mean m_i of the y-values at x_i, sd s_i of the y-values at x_i number n_i of the y-values at x_i and I want to linearly regress y on x. There does not seem to be an option to 'lm' which can deal with such data directly, though the regression problem could be algebraically