similar to: Lmer with weights

Displaying 20 results from an estimated 400 matches similar to: "Lmer with weights"

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)
2009 Sep 24
0
basic cubic spline smoothing (resending because not sure about pending)
Hello, I come from a non statistics background, but R is available to me, and I needed to test an implementation of smoothing spline that I have 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
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
2009 Sep 24
1
basic cubic spline smoothing
Hello, I come from a non statistics background, but R is available to me, and I needed to test an implementation of smoothing spline that I have written 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) +
2006 Nov 21
3
Fitting mixed-effects models with lme with fixed error term variances
Dear R users, I am writing to you because I have a few question on how to fix the error term variances in lme in the hope that you could help me. To my knowledge, the closest possibility is to fix the var-cov structure, but not the whole var-cov matrix. I found an old thread (a few years ago) about this, and it seems that the only alternative is to write the likelihood down and use optim or a
2003 Mar 29
1
Goodness of fit tests
I have a dataset which I want to model using a Poisson distribution, with a given parameter. I would like to know what is the proper way to do a ''goodness of fit'' test using R. I know the steps I''d take if I were to do it ''manually'': grouping the numbers into classes, calculating the expected frequencies using ''ppois'', then
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
2004 Apr 09
1
loess' robustness weights in loess
hi! i want to change the "robustness weights" used by loess. these are described on page 316 of chambers and hastie's "statistical models in S" book as r_i = B(e_i,6m) where B is tukey's biweight function, e_i are the residulas, and m is the median average distance from 0 of the residuals. i want to change 6m to, say, 3m. is there a way to do this? i cant
2009 Mar 25
1
intelligent optimizer (with domain restrictions?)
dear R experts---sorry, second question of the day. I want to match some moments. I am writing my own code---I have exactly as many moment conditions as parameters, and I am leary of having to learn the magic of GMM weighting matrices (if I was to introduce more). the process sounds easy conceptually. (Seen it in seminars many times, so how hard could it possibly be?...me thinks) first
2010 Feb 05
3
metafor package: effect sizes are not fully independent
In a classical meta analysis model y_i = X_i * beta_i + e_i, data {y_i} are assumed to be independent effect sizes. However, I'm encountering the following two scenarios: (1) Each source has multiple effect sizes, thus {y_i} are not fully independent with each other. (2) Each source has multiple effect sizes, each of the effect size from a source can be categorized as one of a factor levels
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 &&
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
2006 May 20
1
(PR#8877) predict.lm does not have a weights argument for newdata
Dear R developers, I am a little disappointed that my bug report only made it to the wishlist, with the argument: Well, it does not say it has. Only relevant to prediction intervals. predict.lm does calculate prediction intervals for linear models from weighted regression, so they should be correct, right? As far as I can see they are bound to be wrong in almost all cases, if no weights
2017 Aug 10
1
"Help On optim"
Hello, I have some parameters from Mclust function. The parameters are in the form *parametersDf * * mu_1 mu_2 var_mc1 var_mc2 c1 c2 * *2 1.357283 2.962736 0.466154 0.1320129 0.5258975 0.4741025 * *21 8.357283 9.962736 0.466154 0.1320129 0.5258975 0.4741025 * Each row in the above data frame
2007 Jun 14
0
random effects in logistic regression (lmer)-- identification question
Hello R users! I've been experimenting with lmer to estimate a mixed model with a dichotomous dependent variable. The goal is to fit a hierarchical model in which we compare the effect of individual and city-level variables. I've run up against a conceptual problem that I expect one of you can clear up for me. The question is about random effects in the context of a model fit with a
2008 Jul 31
1
clustering and data-mining...
Hi all, I am doing some experiment studies... It seems to me that with different combination of 5 parameters, the end results ultimately converged to two scalars. That's to say, some combinations of the 5 parameters lead to one end result and some other combinations of the 5 parameters lead to the other end result (scalar). I am thinking of this is sort of something like clustering or
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
2007 Apr 15
1
Use estimated non-parametric model for sensitivity analysis
Dear all, I fitted a non-parametric model using GAM function in R. i.e., gam(y~s(x1)+s(x2)) #where s() is the smooth function Then I obtained the coefficients(a and b) for the non-parametric terms. i.e., y=a*s(x1)+b*s(x2) Now if I want to use this estimated model to do optimization or sensitivity analysis, I am not sure how to incorporate the smooth function since s() may not
2007 Jun 25
3
Bug in getVarCov.gls method (PR#9752)
Hello, I am using R2.5 under Windows. Looks like the following statement vars <- (obj$sigma^2)*vw in getVarCov.gls method (nlme package) needs to be replaced with: vars <- (obj$sigma*vw)^2 With best regards Andrzej Galecki Douglas Bates wrote: >I'm not sure when the getVarCov.gls method was written or by whom. To >tell the truth I'm not really sure what
2013 Apr 22
3
Scatterplot and Causality
Dear All, I hope this is not too off topic. I am given a set of scatteplots (nothing too fancy; think about a normal x-y 2D plot). I do not deal with two time series (indeed I have no info about time). If I call A=(A1,A2,...) and B=(B1, B2, ...) the 2 variables (two vectors of numbers most of the case, but sometimes they can be categorical variables), I can plot one against the other and I