Displaying 20 results from an estimated 70 matches similar to: "Random effect model"
2005 Aug 02
1
Loop problem
Dear everyone
I am a new user,would like to combine these code together by using a
loop,each function has three value as Tr = 1 - 3,how can i combine
together?
logitTr1 <-logit[logit[,"Study"]&logit[,"Tr"]==1,]
(number of row in each group (1-3) is difference but equal in colume)
fnTr1 <- function (p) sum(
2009 May 20
1
Extracting correlation in a nlme model
Hi R users:
Is there a function to obtain the correlation within groups
from this very simple lme model?
> modeloMx1
Linear mixed-effects model fit by REML
Data: barrag
Log-restricted-likelihood: -70.92739
Fixed: fza_tension ~ 1
(Intercept)
90.86667
Random effects:
Formula: ~1 | molde
(Intercept) Residual
StdDev: 2.610052 2.412176
Number of Observations: 30
Number
2005 Aug 31
2
loop
I was wondering why this loop doesn't work!
for (i in 1:k)
fnTr[i] <- function (p) 0.5* sum ( n*log(2*pi) - log(sd(i)^2)
+(logitp(i)-p)^2/sd(i)^2 )
outTr[i]<- nlm (fnTr[i],p=c(10),hessian=TRUE)
minimumTr[i] <- outTr[i]$minimum
valueTr[i] <- outTr[i]$estimate
list (minimumTr[i],valueTr[i])
Has anyone can help me?
Thank you very much
Hathaikan
2003 Mar 30
1
simple test of lme, questions on DF corrections
I''m a physicist working on fusion energy and dabble in statistics
only occasionally, so please excuse gaps in my statistical
knowledge. I''d appreciate any help that a real statistics expert
could provide. Most people in my field do only very simple
statistics, and I am trying to extend some work on multivariate
linear regression to account for significant between-group
2012 Feb 02
0
glmer question
I would like to fit the following model:
logit(p_{ij}) = \mu + a_i + b_j
where a_i ~ N(0, \sigma_a^2) , b_j ~ N(0, \sigma_b^2) and \sigma_a
= \sigma_b.
Is it possible to fit a model with such a constraint on the variance
components in glmer?
--
View this message in context: http://r.789695.n4.nabble.com/glmer-question-tp4351829p4351829.html
Sent from the R help mailing list archive at
2006 Jun 05
1
Extracting Variance components
I can ask my question using and example from Chapter 1 of Pinheiro & Bates.
> # 1.4 An Analysis of Covariance Model
>
> OrthoFem <- Orthodont[ Orthodont$Sex == "Female", ]
> fm1OrthF <-
+ lme( distance ~ age, data = OrthoFem, random = ~ 1 | Subject )
> summary( fm1OrthF )
Linear mixed-effects model fit by REML
Data: OrthoFem
AIC BIC
2008 Nov 14
1
aov help
Please pardon an extremely naive question. I see related earlier
posts, but no responses which answer my particular question. In
general, I'm very confused about how to do variance decomposition with
random and mixed effects. Pointers to good tutorials or texts would
be greatly appreciated.
To give a specific example, page 193 of V&R, 3d Edition, illustrates
using raov assuming pure
2004 Apr 05
3
2 lme questions
Greetings,
1) Is there a nice way of extracting the variance estimates from an lme fit? They don't seem to be part of the lme object.
2) In a series of simulations, I am finding that with ML fitting one of my random effect variances is sometimes being estimated as essentially zero with massive CI instead of the finite value it should have, whilst using REML I get the expected value. I guess
2008 Mar 24
0
What is the correct model formula for the results of piecewise linear function?
Dear friends,
I used the B-spline (degree=1) method to fit the piecewise linear function
and the results are listed below.
m.glm<-glm(mark~x+poly(elevation,2)+bs(distance,degree=1,knots=c(16.13,24))
+bs(y,degree=1,knots=c(-0.4357,-0.3202
)),family=binomial(logit),data=point)
summary(m.glm)
Coefficients:
Estimate Std.
2004 Sep 08
8
isoMDS
Dear List:
I have a question regarding an MDS procedure that I am accustomed to
using. I have searched around the archives a bit and the help doc and
still need a little assistance. The package isoMDS is what I need to
perform the non-metric scaling, but I am working with similarity
matrices, not dissimilarities. The question may end up being resolved
simply.
Here is a bit of substantive
2009 Feb 28
0
Implementation of quasi-bayesian maximum likelihood estimation for normal mixtures
Hi,
as you can see in the topic, I am trying to fit a normal mixture
distribution with the approach suggested by Hamilton (1991). Since I
couldn't find any existing packages including the quasi-bayesian mle, I
have to write my own function. Unfortunately, I have absolutely no
experience in doing this.
If you're not familiar with the QB-MLE, I attached the formula as pdf.
The idea
2008 Aug 29
3
extract variance components
HI,
I would like to extract the variance components estimation in lme function
like
a.fit<-lme(distance~age, data=aaa, random=~day/subject)
There should be three variances \sigma_day, \sigma_{day %in% subject } and
\sigma_e.
I can extract the \sigma_e using something like a.fit$var. However, I cannot
manage to extract the first two variance components. I can only see the
results in
2008 Jun 17
2
constrOptim with method = "L-BFGS-B"
Hi,
i need to minimize a quadratic function with boundary condidtions and one
equality condition.
In order to do that i converted the equality constraint into 2 inequality
constaints and passed everything cia constrOptim, as the manual said:
everything included in the ... will be passed to Optim that will pass it
back to fn in case it does not need it.
My code is the following:
mat <-
2005 Mar 18
1
Bivariate normal distribution and correlation
Suppose I know the value of cumulative bivariate standard normal distribution. How can I solve correlation between variables?
Pekka
---------------------------------
[[alternative HTML version deleted]]
2009 Nov 26
1
How to suppress errors generated by readHTMLTable?
library(XML)
download.file('http://polya.umdnj.edu/polya_db2/gene.php?llid=109079&unigene=&submit=Submit','index.html')
tables=readHTMLTable("index.html",error=function(...){})
tables
readHTMLTable gives me the following errors. Could somebody let me
know how to suppress them?
Opening and ending tag mismatch: center and table
htmlParseEntityRef: expecting
2011 Nov 15
3
Create a function with multiple object as an output
I've seen some questions regarding the output of multiple objects from a
function, however the suggestions all end up suggesting the use of
return(list(result1=result1, result2=result2 , result3=result3)).
How can I return multiple objects that are 2 big to be added to a list?
--
View this message in context:
2011 Nov 15
1
R Program
Can someone help me out with this problem?
Write an R program to draw 10,000 random samples using the Polya Urn Scheme
where the initial contents of the urn is one white ball and one black ball.
Accumulate the proportion of white balls after each draw into one vector.
Upload your R script file.
HINT: You can simulate sampling one ball from an urn with N balls of which w
are white and N - w are
2010 Nov 16
2
Debugging segfault in foreach
Hi,
I'm using R-2.12 on a linux 64bit machine.
When I run a chunk of code inside a foreach() %do% { ...} or %dopar%
{...} (with doMC backend) I keep getting a segfault. Running the
*same* code within lapply(something, function(x) ... ) doesn't result
in any segfaults. I'll paste the output below, but I'm not sure it
would be helpful.
I'm more curious how to go about smoking
2001 Mar 16
2
SIGHUP/av[0] restart failure
Hello,
OpenSSH 2.5.1p1 running under AIX 4.3.3ML06. When I send a HUP
signal to the parent sshd, that parent process dies, it's children
get "adopted" by init, and the following message is put in the error
log ...
Mar 13 12:01:48 whippet sshd[31644]: Received SIGHUP; restarting.
Mar 13 12:01:48 whippet sshd[31644]: RESTART FAILED: av[0]='sshd',
error: No such file or
2003 Jun 29
1
vinum drive referenced / disklabel inconsistency
I am trying to setup vinum on a box using 4.8 RELENG_4 (as of about a
week ago snapshot). This box was running 4.6 /w vinum on same hard
drives for the last 4 months wonderfully... but since it is my
current 'scratch/backup' box, I just reinstalled with -STABLE.
# uname -a
FreeBSD polya.axista.com 4.8-STABLE FreeBSD 4.8-STABLE #22: Tue Jun 24
17:01:07 EDT 2003