search for: varfix

Displaying 20 results from an estimated 44 matches for "varfix".

2023 Mar 04
1
nlme varFixed
Dear R-project team, I have a problem with the function varFixed() of the nlme-package. I used it with the squid-data of Zuur et. al 2009 (chapter 4), to fix increasing residuals (heterogenetiy) (see graph in the email) I get the message ' Variance function structure of class varFixed with no parameters, or uninitialized Could you help me please? Ki...
2003 Dec 21
2
varFixed
Dear List: Earlier this week I posted a question and received no response, and I continue to struggle with my model. My original question is pasted below. I am using lme and want to fix the variance of the within group residual at 1 (e~n(0,1). I think the varFixed function should be used to accomplish this, but I am struggling to figure out how to do this. Can anyone offer suggestions on how this might be accomplished? Thanks, I would appreciate any suggestions. Harold Dear List: I am trying to figure out how to incorporate measurement error in...
2009 Sep 17
1
Dealing with heterogeneity with varComb weights
Hi, I am trying to add multiple variance structures such as the first example below: vf1 <- varComb(varIdent(form = ~1|Sex), varPower()) However my code below will not work can anybody please advise me? VFcomb<-varComb(varExp(form=~depcptwithextybf),varFixed(form=~FebNAO)) also if you have two variables with the same weights function would you write that as: VFcomb<-varComb(varExp(form=~depcptwithextybf),varExp(form=~FebNAO)) thanks Rebecca -- View this message in context: http://www.nabble.com/Dealing-with-heterogeneity-with-varComb-weights...
2005 Dec 27
2
glmmPQL and variance structure
Dear listers, glmmPQL (package MASS) is given to work by repeated call to lme. In the classical outputs glmmPQL the Variance Structure is given as " fixed weights, Formula: ~invwt". The script shows that the function varFixed() is used, though the place where 'invwt' is defined remains unclear to me. I wonder if there is an easy way to specify another variance structure (eg varPower, etc..), preferably using an lme object of the varFunc classes ? Some trials show that the 'weights' argument of glm...
2009 Aug 19
1
how to specify two variance effects in gls
Hello everybody, I have a dataset where each row has number of subjects and that gives me natural weights for the variance function. Additionally I see that variance increases with Age, which is a regressor. So using gls I have weights=varFixed(~1/n) but don't know how to include the extra effect of the regressor. Fitted values show a quadratic curve vs. age, not sure if that helps. Thanks everybody. Stephen [[alternative HTML version deleted]]
2013 Jan 23
1
mixed effects meta-regression: nlme vs. metafor
...r the moment I use a linear model, i.e., twice the followup time will give you twice the effect, etc... I get /almost/ what I want using "nlme" via this command: lme01 <- lme(effect ~ treatment + treatment*time - time - 1, random = ~ 1|study, weights = varFixed(~se2), data = dat) "effect" is the real-valued measurement, "treatment" is a factor, and "time" is the followup time in months. "se2" is the squared standard error. Problem is: using the "varFixed()" option, "lme()" will...
2017 Aug 09
3
Plotting log transformed predicted values from lme
...effect variables;one as a log transformed variable (x) and one as factor (y) variable, and two nested random intercept terms. I want to save the predicted values from that model and show the log curve in a plot ; predicted~log(x) mod<-lme(B~log(x)+as.factor(y), random=~1|cohort/Study, weights=varFixed(~I(SE^2)), na.action=na.omit, data=subset(meta), control = lmeControl(sigma = 1, apVar = FALSE)) summary(mod) newdat <- data.frame(x=seq(min(meta$x), max(meta$x),,118)) # I have 118 observations. #How do I add the factor variable to my newdat? newdat$pred <- predict(mod, newdat,...
2006 Mar 16
2
DIfference between weights options in lm GLm and gls.
...t; glm4 Call: glm(formula = ys ~ Xs - 1) Coefficients: Xs Xsx 2.687 6.528 Degrees of Freedom: 1243 Total (i.e. Null); 1241 Residual Null Deviance: 4490000 Residual Deviance: 506700 AIC: 11000 With weights, the glm did not give the same results as lm why? Also for gls, I use varFixed here. > gls3 Generalized least squares fit by REML Model: y ~ x Data: NULL Log-restricted-likelihood: -3737.392 Coefficients: (Intercept) x 0.03104214 7.31032540 Variance function: Structure: fixed weights Formula: ~W Degrees of freedom: 1243 total; 1241 residual Residua...
2005 Sep 29
2
how to fix the level-1 variances in lme()?
Dear all, Edmond Ng (http://multilevel.ioe.ac.uk/softrev/reviewsplus.pdf) provides an example to fit the mixed effects meta-analysis in Splus 6.2. The syntax is: lme(fixed=d~wks, data=meta, random=~1|study, weights=varFixed(~Vofd), control=lmeControl(sigma=1)) where d is the effect size, study is the study number, Vofd is the variance of the effect size and meta is the data frame. "sigma=1" is required to constrain the level 1 variance in applying mixed-effects models in meta-analysis. In Splus 6.1, I...
2004 Feb 17
1
extracting standard error from lme output
Dear R experts, I want to extract standard error from the output of lme, but I found fix.effects() does not include SE of the coefficients. Many thanks in advance. Best regards, Yu-Kang _________________________________________________________________ ²{¦b´N¤W MSN ·|­û¥Ø¿ý¡G¦b½u¤Wµ²¥æ·sªB¤Í¡A§ä¨ì¿³½ì¬Û§ëªº¹Ù¦ñ
2004 May 11
1
Meta-Analysis using lme
...lysis, i.e. I'd like to use a multi-level model to integrate the findings of a number of primary research studies. I set up a simple two level-model (only summary statistics are provided by each study) as follows: sapp.lme <- lme(D ~ 1, data = sapp.frame, random = ~ 1 | STUDYNR, weights=varFixed(~-1+STDERR_D),na.action = na.exclude) The intercept is random on both levels and the variable stderr_D (the sampling variance) is supposed to be random only on level one. Besides, I need to constrain the variance of stderr_d to equal 1. Could anybody help me correct the code I provided? Thanks...
2006 Apr 19
1
Can't run code from "Mixed Effects Models in S and S-plus"
...;. library( nlme ) options( width = 65, digits = 5 ) options( contrasts = c(unordered = "contr.helmert", ordered = "contr.poly") ) # Chapter 5 Extending the Basic Linear Mixed-Effects Models # 5.1 General Formulation of the Extended Model data( Orthodont ) vf1Fixed <- varFixed( ~ age ) vf1Fixed <- initialize( vf1Fixed, data = Orthodont ) Can anyone help me? Thanks
2009 Mar 11
1
Multilevel Modeling using glmmPQL
...mulation for a simple multilevel model, using the function glmmPQL in R version 2.8.1. I want to extract the p-value for the fixed-effects portion of the regression, but I'm having trouble doing that. I can extract the coefficients (summary(fit)$coeff), and the covariance matrix (summary(fit)$varFix), but I can't grab the p-value (or the t-statistic.) Could someone explain how to do this? Please send responses to halper@health.nyc.gov. Thanks in advance, Howard DISCLAIMER:\ Sample Disclaimer added in a VBScript.\ \ ...{{dropped:6}}
2009 Apr 06
1
nlme weighted
...not be much affected by these weights, but the population mean). I don't quite see how to do this weighting by nlme-group. I think what I need is something that multiplies these weights to the residual variance. My first hint would be something as it is described by the function varIdent or varFixed, but it is not quite clear to me what is being done by these (e.g. what is meant by variance covariate etc.?). I thank you very much in advance if you could briefly comment on that and point out the function for the weighting that should be applied. All the best Fabian Mollet [[alter...
2009 Apr 29
1
meta regression in R using lme function
...l, We are trying to do a meta regression in R using the lme function. The reason for doing this with lme function is that we have covariates and studies within references. In S-Plus this is possible by using the following command: lme(outcome ~ covars, random = ~1 | reference/study, weights = varFixed(~var.outcome), data = mydata, control = lmeControl(sigma = 1)) This means that the residual variance is equal to var.outcome times sigma, where sigma is fixed to 1. In R we do not know how to fix sigma = 1 in the lmeControl. Has anyone experience with this? If so, how can we solve this proble...
2005 Sep 01
2
VarCorr function for assigning random effects: was Question
...imulation in my research and need to be assigned variance components values during of my program. Specifically, when I use lme function, I can get some information by use summary() and I can assign some valuse like variance of fixed parameters and variance of random error term by using for example varFix and sigma.But I don't know how I can assign for variance of random effect. I know in SPLUS we have command var.ran, how about R ? Thanks alot. M.Torabi ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d...
2017 Aug 10
0
Plotting log transformed predicted values from lme
...nsformed variable (x) and one as factor (y) variable, and two nested > random intercept terms. > > I want to save the predicted values from that model and show the log curve > in a plot ; predicted~log(x) > > mod<-lme(B~log(x)+as.factor(y), random=~1|cohort/Study, > weights=varFixed(~I(SE^2)), na.action=na.omit, data=subset(meta), > control = lmeControl(sigma = 1, apVar = FALSE)) > summary(mod) > > newdat <- data.frame(x=seq(min(meta$x), max(meta$x),,118)) # I have 118 > observations. #How do I add the factor variable to my newdat? > newdat$pr...
2005 Nov 27
1
fixed, random effects with variable weights
...ically, I want to run a standard economist's fixed, and random effects regression (corresponds to xtreg in STATA) but with _variable_ weights (they correspond to changing industry shares in the market). Here is what I do: regsc<-lme(dsc~dcomp+dperc,random=~1|ind7090) update(regsc,weights=varFixed(~wt)) 1. however, my results are different from what I obtain in Stata using areg (the weighted fixed effects times series regression). any ideas? 2. how do I read of the random affects results from this regression? (i.e. coefficients on dcomp and dperc?) Any hint would greatly be appreciated...
2005 Jun 21
2
Problem trying to use boot and lme together
...lt;- lme(tot ~ time + timepost + pct + totpat + (time + timepost) : single + single + (time + timepost) : train + train + time:gpattend + timepost:gpattend + gpattend, data = data, random = ~ time + timepost | gp) summ <- summary(mod) c(fixef(summ), diag(summ$varFix)) } model.fun <- function(d, i) { d$tot <- d$fit+d$res[i] cats.fit(d) } tot.boot <- boot(common, model.fun, R=999) ============================================ So I fit the model and then generate fitted values and residuals which I use within the model.fun function to generate th...
2009 Mar 27
1
LME as part of meta-analysis
...between 10-20 times. Within this, I want to use lme to create estimates for the average true value, sample mean and average standard error for alpha, theta, beta and the respective tau^2 values for each of these. For the lme part, I'm using this a<-summary(lme(alp~1,random=~1|alp, weights=varFixed(~staalp^2))) This is the one for alpha. This isn't producing the type of results I would expect, can anyone see where I'm going wrong? Thanks. -- View this message in context: http://www.nabble.com/LME-as-part-of-meta-analysis-tp22751101p22751101.html Sent from the R help mailing li...