similar to: nlme question

Displaying 20 results from an estimated 1000 matches similar to: "nlme question"

2005 Nov 16
0
nmle question
Hello. I have 16 subjects with 1-4 obs per subject. I am using the package "nlme" to fit a simple random effects (variance components model) with 3 parameters: overall mean (fixed effect), between subject variance (random) and within subject variance (random). I need a 3x3 variance-covariance matrix that includes all 3 parameters in order to compute the variance of a specific
2005 Mar 28
1
mixed model question
I am trying to fit a linear mixed model of the form y_ij = X_ij \beta + delta_i + e_ij where e_ij ~N(0,s^2_ij) with s_ij known and delta_i~N(0,tau^2) I looked at the ecme routine in package:pan, but this routine does not allow for different Vi (variance covariance matrix of the e_i vector) matrices for each cluster. Is there an easy way to fit this model in R or should I bite the bullet and
2011 Jul 19
1
notation question
Dear list, I am currently writing up some of my R models in a more formal sense for a paper, and I am having trouble with the notation. Although this isn't really an 'R' question, it should help me to understand a bit better what I am actually doing when fitting my models! Using the analysis of co-variance example from MASS (fourth edition, p 142), what is the correct notation for the
2003 Jun 19
2
Fitting particular repeated measures model with lme()
Hello, I have a simulated data structure in which students are nested within teachers, and with each student are associated two test scores. There are 20 classrooms and 25 students per classroom, for a total of 500 students and two scores per student. Here are the first 10 lines of my dataframe "d": studid tchid Y time 1 1 1 -1.0833222 0 2 1 1
2009 May 07
2
lasso based selection for mixed model
Dear useRs (called Frank Harrell, most likely), after having preached for years to my medical colleagues to be cautious with stepwise selection procedures, they chanted back asking for an alternative when using mixed models. There is a half dozen laXXX packages around for all types of linear models, but as far I see there is none for mixed models such as lme. Even boot.stepAIC (which I
2011 Sep 22
1
Error in as.vector(data) optim() / fkf()
Dear R users, When running the program below I receive the following error message: fit <- optim(parm, objective, yt = tyield, hessian = TRUE) Error in as.vector(data) : no method for coercing this S4 class to a vector I can't figure out what the problem is exactly. I imagine that it has something to do with "tyield" being a matrix. Any help on explaining what's going on
2006 Oct 22
1
Multilevel model ("lme") question
Dear list, I'm trying to fit a multilevel (mixed-effects) model using the lme function (package nlme) in R 2.4.0. As a mixed-effects newbie I'm neither sure about the modeling nor the correct R syntax. My data is structured as follows: For each subject, a quantity Y is measured at a number (>= 2) of time points. Moreover, at time point 0 ("baseline"), a quantity X is
2011 Nov 12
1
State space model
Hi, I'm trying to estimate the parameters of a state space model of the following form measurement eq: z_t = a + b*y_t + eps_t transition 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
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
2018 Feb 16
0
SE for all levels (including reference) of a factor atfer a GLM
This is really a statistical issue. What do you think the Intercept term represents? See ?contrasts. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Feb 15, 2018 at 5:27 PM, Marc Girondot via R-help < r-help at
2004 Jun 07
2
MCLUST Covariance Parameterization.
Hello all (especially MCLUS users). I'm trying to make use of the MCLUST package by C. Fraley and A. Raftery. My problem is trying to figure out how the (model) identifier (e.g, EII, VII, VVI, etc.) relates to the covariance matrix. The parameterization of the covariance matrix makes use of the method of decomposition in Banfield and Rraftery (1993) and Fraley and Raftery (2002) where
2009 Aug 06
1
solving system of equations involving non-linearities
Hi, I would appreciate if someone could help me on track with this problem. I want to compute some parameters from a system of equations given a number of sample observations. The system looks like this: sum_i( A+b_i>0 & A+b_i>C+d_i) = x sum_i( C+d_i>0 & C+d_i>A+b_i) = y sum_i( exp(E+f_i) * ( A+b_i>0 & A+b_i>C+d_i) = z A, C, E are free variables while the other
2006 Mar 08
1
power and sample size for a GLM with Poisson response variable
Craig, Thanks for your follow-up note on using the asypow package. My problem was not only constructing the "constraints" vector but, for my particular situation (Poisson regression, two groups, sample sizes of (1081,3180), I get very different results using asypow package compared to my other (home grown) approaches. library(asypow) pois.mean<-c(0.0065,0.0003) info.pois <-
2018 Feb 16
2
SE for all levels (including reference) of a factor atfer a GLM
Dear R-er, I try to get the standard error of fitted parameters for factors with a glm, even the reference one: a <- runif(100) b <- sample(x=c("0", "1", "2"), size=100, replace = TRUE) df <- data.frame(A=a, B=b, stringsAsFactors = FALSE) g <- glm(a ~ b, data=df) summary(g)$coefficients # I don't get SE for the reference factor, here 0:
2011 Oct 19
1
Estimating bivariate normal density with constrains
Dear R-Users I would like to estimate a constrained bivariate normal density, the constraint being that the means are of equal magnitude but of opposite signs. So I need to estimate four parameters: mu (meanvector (mu,-mu)) sigma_1 and sigma_2 (two sd deviations) rho (correlation coefficient) I have looked at several packages, including Gaussian mixture models in Mclust, but I am not sure
2008 Aug 04
2
Multivariate Regression with Weights
Hi all, I'd like to fit a multivariate regression with the variance of the error term porportional to the predictors, like the WLS in the univariate case. y_1~x_1+x_2 y_2~x_1+x_2 var(y_1)=x_1*sigma_1^2 var(y_2)=x_2*sigma_2^2 cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2 How can I specify this in R? Is there a corresponding function to the univariate specification lm(y~x,weights=x)??
2008 May 16
1
Making slope coefficients ``relative to 0''.
I am interested in whether the slopes in a linear model are different from 0. I.e. I would like to obtain the slope estimates, and their standard errors, ``relative to 0'' for each group, rather than relative to some baseline. Explicitly I would like to write/represent the model as y = a_i + b_i*x + E i = 1, ..., K, where x is a continuous variate and i indexes groups (levels of a
2007 Apr 16
1
Greek symbols in xtable rows
Dear R-helpers, I am using xtable package to prepare a Latex code of some R tables. Is this possible to have a greek symbols in xtable cells? How can I get for example a string of : $\Delta$ > "$\Delta$" [1] "$Delta$" And string: > "$\\Delta$" [1] "$\\Delta$" Gives a latex aoutput like: \$$\backslash$Delta\$ Thank You in advance Andris
2003 Oct 23
1
Variance-covariance matrix for beta hat and b hat from lme
Dear all, Given a LME model (following the notation of Pinheiro and Bates 2000) y_i = X_i*beta + Z_i*b_i + e_i, is it possible to extract the variance-covariance matrix for the estimated beta_i hat and b_i hat from the lme fitted object? The reason for needing this is because I want to have interval prediction on the predicted values (at level = 0:1). The "predict.lme" seems to
2008 Dec 02
1
question on lmer function
suppose something like probability(passing test) is driven by 1. fixed effects -- sex 2. district effects - district funding 3. school effects - neighborhood income, racial composition, % two parent families, ... 4. class effects - teacher quality measurement, 5. individual random effects - IQ. how would such a model be setup in lmer? I can't find much discussion on the