Displaying 20 results from an estimated 1000 matches similar to: "Calculation of r squared from a linear regression"
2013 Nov 17
1
order() function, decreasing=TRUE unexpected behaviour
There appears to be an issue with the decreasing=TRUE option on the order() function that indicates either a bug or perhaps a design flaw (potentially flawed because I would suggest the majority of users would expect different behaviour).
# demonstration of problem:
x <- c(2,1,3,4,5)
order(x)
order(x, decreasing=TRUE)
order(x) correctly reports the order as:
2 1 3 4 5
I expected the result
2012 Jan 23
1
Jags problem
Hi, all:
I met "Non-conforming parameters for function %*%" problem, when I run the
Jags model in R.
My model is like this:
model{
for(i in 1:n){
for(j in 1:t[i]){
et[i,j]<-yt[i,j]-beta0+betax*xt[i,j]+betat*t[i,j]
}
for(a in 1:t[i]){
for(b in 1:t[i]){
sigma[i,a,b]<-pow(rho0,abs(t[a]-t[b]))
}
}
phi[i]<-
2005 Mar 07
2
Setting up asterisk with current PBX?
We currently have a Toshiba Perception EX and I would like to start
moving toward VOIP. Is there anyway we can run these two systems in
parrallel? Better yet, is there anyway we can run fully on asterisk
using the current PBX hardware? The current PBX has a mix of analog,
digital and electronic cards in it. I tried to google for advice but
I didn't find anything that pertained to this.
2010 Jan 22
4
Extract R-squared from summary of lm
Dear all,
I cannot find to explicitly get the R-squared or adjusted R-squared from
summary(lm())
Thanks a lot!
[[alternative HTML version deleted]]
2012 Sep 03
2
Coxph not converging with continuous variable
The coxph function in R is not working for me when I use a continuous predictor in the model. Specifically, it fails to converge, even when bumping up the number of max iterations or setting reasonable initial values. The estimated Hazard ratio from the model is incorrect (verified by an AFT model). I've isolated it to the "x1" variable in the example below, which is log-normally
2006 Mar 21
1
Scaling behavior ov bVar from lmer models
Hi all,
To follow up on an older thread, it was suggested that the following
would produce confidence intervals for the estimated BLUPs from a linear
mixed effect model:
OrthoFem<-Orthodont[Orthodont$Sex=="Female",]
fm1OrthF. <- lmer(distance~age+(age|Subject), data=OrthoFem)
fm1.s <- coef(fm1OrthF.)$Subject
fm1.s.var <- fm1OrthF. at bVar$Subject
fm1.s0.s <-
2007 Nov 09
1
Confidence Intervals for Random Effect BLUP's
I want to compute confidence intervals for the random effect estimates
for each subject. From checking on postings, this is what I cobbled
together using Orthodont data.frame as an example. There was some
discussion of how to properly access lmer slots and bVar, but I'm not
sure I understood. Is the approach shown below correct?
Rick B.
# Orthodont is from nlme (can't have both nlme and
2008 May 27
3
How to test significant differences for non-linear relationships for two locations
Hi List,
I have to compare a relationship between y and x for two locations. I found logistic regression fits both datasets well, but I am not sure how to test if relationships for both sites are significantly different. I searched the r site, however no answers exactly match the question.
I used Tukey's HSD to compare two means, but the relationship in my study was not simply linear. So I
2005 Dec 22
2
bVar slot of lmer objects and standard errors
Hello,
I am looking for a way to obtain standard errors for emprirical Bayes estimates of a model fitted with lmer (like the ones plotted on page 14 of the document available at http://www.eric.ed.gov/ERICDocs/data/ericdocs2/content_storage_01/0000000b/80/2b/b3/94.pdf). Harold Doran mentioned (http://tolstoy.newcastle.edu.au/~rking/R/help/05/08/10638.html) that the posterior modes' variances
2006 Jun 28
3
lme convergence
Dear R-Users,
Is it possible to get the covariance matrix from an lme model that did not converge ?
I am doing a simulation which entails fitting linear mixed models, using a "for loop".
Within each loop, i generate a new data set and analyze it using a mixed model. The loop stops When the "lme function" does not converge for a simulated dataset. I want to
2009 Jan 28
1
gls prediction using the correlation structure in nlme
How does one coerce predict.gls to incorporate the fitted correlation
structure from the gls object into predictions? In the example below
the AR(1) process with phi=0.545 is not used with predict.gls. Is
there another function that does this? I'm going to want to fit a few
dozen models varying in order from AR(1) to AR(3) and would like to
look at the fits with the correlation structure
2006 Nov 16
4
lme4 package: Fitted values and residuals
Dear all,
I have three concerns:
1)
I am running models with the lme4 package. I cannot find a way to pull
out a vector of the fitted values and the residuals. Does anybody know
how to do it?
2)
How can I nest a random effect variable into a "two-level" fixed effect
variable?
3)
Suppose I have the following model:
y = a + b|c + d + error,
where 'a' is a fixed effect, 'c'
2006 Sep 04
2
Question about ACMError
Hi all,
Could you teach me about the behavior of xm commands when
''ACMError'' occurred?
I am testing the behavior of xm commands with wrong arguments.
When I tested xm commands related to security (xm *label/*policy),
I found that some of them.
- return 0,
- show ACMError''s Traceback messages.
Are these results specifications or bugs?
Example:
# xm cfgbootpolicy
2012 Feb 09
1
Tukey HSD
Hey Folks:
New to R and learning as I go, but really, I know just enough to get myself
into trouble. I've waded through everything up till now, and don't see
anything in the search that is directly helpful for the POS that I've
created.
The GOAL: All I want in the world is a program that performs 1-way ANOVA's
on every column in a data set (taking the first column as the
2002 Nov 24
1
Understanding function residuals()
Hello:
I am trying to understand why glm() does not replicate the results in
Dobson, "Introduction to Generalized Linear Models," pp. 17-20.
I set up the following model. The variable CONDT is assumed as Poisson and
the objective is to estimate the expected value.
The data (chronic medical conditions among women in Australia) is as
follows:
CONDT <- c(0, 1, 1, 0, 2, 3, 0, 1,
2006 Oct 18
1
lmer- why do AIC, BIC, loglik change?
Hi all,
I am having issues comparing models with lmer. As an example, when
I run the code below the model summaries (AIC, BIC, loglik) differ between
the summary() and anova() commands. Can anyone clear up what's wrong?
Thank you!
Darren Ward
library(lme4)
data(sleepstudy)
fm1<-lmer(Reaction ~ Days + (1|Subject), sleepstudy)
summary(fm1)
fm2<-lmer(Reaction ~ Days +
2024 Jul 16
2
Automatic Knot selection in Piecewise linear splines
>>>>> Anupam Tyagi
>>>>> on Tue, 9 Jul 2024 16:16:43 +0530 writes:
> How can I do automatic knot selection while fitting piecewise linear
> splines to two variables x and y? Which package to use to do it simply? I
> also want to visualize the splines (and the scatter plot) with a graph.
> Anupam
NB: linear splines, i.e. piecewise
2010 Dec 31
2
Class "coef.mer" into a data.frame?
Hello,
Could somebody please tell me what am I doing wrong in following?
I try extract coefficients (using arm-package) from the lmer
frunction, but I get the
following warning:
a<-data.frame(coef(res))
Error in as.data.frame.default(x[[i]], optional = TRUE,
stringsAsFactors = stringsAsFactors) :
cannot coerce class "coef.mer" into a data.fram
I think I have done it before
2002 Dec 15
2
Interpretation of hypothesis tests for mixed models
My question concerns the logic behind hypothesis tests for fixed-effect
terms in models fitted with lme. Suppose the levels of Subj indicate a
grouping structure (k subjects) and Trt is a two-level factor (two
treatments) for which there are several (n) responses y from each
treatment and subject combination. If one suspects a subject by
treatment interaction, either of the following models seem
2010 Jan 18
2
Problem extracting from mer objects
I am having a problem extracting from "mer" objects.
I have constructed my problem using existing datasets.
Using the following commands:
require(lme4)
fm1 <- lmer(Yield ~ 1 + (1 | Batch), Dyestuff)
fixef(fm1)
I get the following error message:
"Error in UseMethod("fixef") : no applicable method for "fixef""
I know that "fixef" is in