Displaying 20 results from an estimated 800 matches similar to: "nlme: Computing REML likelihood value from ML likelihood value"
2010 Jan 03
2
plot question
Hi,
I am new to R so forgive me if the following query is somewhat simple. I have a small tab-separated file with n records of glucose values, one record per day, seven measurements per day. It looks like this:
date sober no vm nm va na vs
20091229 NA 6.8 NA 2.7 11.7 2.7 6.2
I'd like to make a graph on which the glucose day curves are plotted
2018 Apr 25
0
Zero errors : Bug in my R code ?
Dear R-experts,
I guess I have a problem with my fast function (fast tau estimator) here below. Indeed, zero errors look highly suspicious. I guess there is a bug in my R code. How could I correct my R code ?
# install.packages( "robustbase" )
# install.packages( "MASS" )
# install.packages( "quantreg" )
# install.packages( "RobPer" )
#
2013 Jan 07
3
renumber a list of numbers
Greetings R users,
I am trying to renumber my groups within the file shown below. The groups
are currently set as 8,9,10,etc. I would like to renumber this as
1,2,3,etc. I have searched the help files and only come across using the
rownames to renumber the values but I need to match values. Any assistance
is always appreciated,
Regards,
Charles
structure(list(Group = structure(c(1L, 1L, 1L,
2003 Sep 26
3
Std. errors of intercept and slope
Dear all,
I have the following output generated by linear regression. Since there is
only one regression intercept and one slope for one set of data, what is the
meaning of std. error for intercept and that of slope? Thanks in advance.
Sincerely,
Minghua
> data(thuesen)
> attach(thuesen)
> lm(short.velocity~blood.glucose)
Call:
lm(formula = short.velocity ~ blood.glucose)
2007 Nov 14
2
Help with Bartlett's test on linear model
Hi all,
I would like to test the homoegeneity of variances between several
linear model for some analysis of covariance. It seems that the
Bartlett's test is a good test to use but I am having problem using with
linear model and I cannot find any examples on the internet. There are
some examples for comparisons of variances but not linear models.
If I take the hellung data set, which is
2018 May 22
0
Bootstrap and average median squared error
Hello,
If you want to bootstrap a statistic, I suggest you use base package boot.
You would need the data in a data.frame, see how you could do it.
library(boot)
bootMedianSE <- function(data, indices){
d <- data[indices, ]
fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d)
ypred <- predict(fit)
y <- d$crp
median(y - ypred)^2
}
dat <-
2018 May 22
2
Bootstrap and average median squared error
I forgot, you should also set.seed() before calling boot() to make the
results reproducible.
Rui Barradas
On 5/22/2018 10:00 AM, Rui Barradas wrote:
> Hello,
>
> If you want to bootstrap a statistic, I suggest you use base package boot.
> You would need the data in a data.frame, see how you could do it.
>
>
> library(boot)
>
> bootMedianSE <- function(data,
2004 Sep 03
0
ML vs. REML with gls()
Hello listmembers,
I've been thinking of using gls in the nlme package to test for serial
correlation in my data set. I've simulated a sample data set and have
found a large discrepancy in the results I get when using the default
method REML vs. ML.
The data set involves a response that is measured twice a day (once for
each level of a treatment factor). In my simulated data set, I
2003 Jul 25
1
glmmPQL using REML instead of ML
Hi,
In glmmPQL in the MASS library, the function uses
repeated calls to the function lme(), using ML. Does
anyone know how you can change this to REML? I know
that in lme(), the default is actually set to REML and
you can also specify this as 'method=REML' or
'method'ML' but this isn't applicable to glmmPQL().
I'd appreciate any help or advice!
Thanks,
Emma
2009 Oct 27
1
"ipredknn" - How may I find values?
Hi everybody!
I want to find a closer neighbourins observation. This is my code:
##########################
library(klaR)
library(ipred)
library(mlbench)
data(PimaIndiansDiabetes2)
dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)]
dane[,2]=log(dane[,2])
dane[,1:2]=scale(dane[,1:2])
zbior.uczacy=sample(1:nrow(dane),nrow(dane)/2,F)
2009 Aug 17
1
Multiple comparison on lme model with 2 fixed factors
Hi!
I'm a bit lost while performing multiple comparisons on a lme model of that
type:
lmeglu=lme(glucose~Ath*tim,random=~1|Vol,na.action=na.omit,data=data)
multc = glht(lmeglu, linfct = mcp(Ath = "Tukey", tim = "Tukey"))
This works fine for identifying the effect of each factor. However, when I
look for their interactions, l only obtain error messages.
For example this
2007 Oct 19
2
In a SLR, Why Does the Hat Matrix Depend on the Weights?
I understand that the hat matrix is a function of the predictor variable
alone. So, in the following example why do the values on the diagonal of the
hat matrix change when I go from an unweighted fit to a weighted fit? Is the
function hatvalues giving me something other than what I think it is?
library(ISwR)
data(thuesen)
attach(thuesen)
fit <- lm(short.velocity ~ blood.glucose)
2012 Oct 28
1
Why are coefficient estimates using ML and REML are different in lme?
Hi, All,
My data collection is from 4 regions (a, b, c, d). Within each region, it has 2 or 3 units. Within each unit, it has measurement from about 25 sample site. I was trying to use lme function to discribe relationship between y and a few covariates. Both y and covariates were measured at the sample site level. My question is when I use exactlly the same model but choose different estimation
2009 May 12
1
questions on rpart (tree changes when rearrange the order of covariates?!)
Greetings,
I am using rpart for classification with "class" method. The test data is
the Indian diabetes data from package mlbench.
I fitted a classification tree firstly using the original data, and then
exchanged the order of Body mass and Plasma glucose which are the
strongest/important variables in the growing phase. The second tree is a
little different from the first one. The
2004 Sep 05
1
Question to NLME, ML vs. REML
Dear all,
I am planning to use nlme library for analysis of experiments in semiconductor
industry. Currently I am using "lm" but plan to move to "lme" to handle
within wafer / wafer-to-wafer and lot-to-lot variation correctly.
So far everything is working well, but I have a fundamentel question:
NLME offers "maximum likelihood" and "restricted maximum
2007 Apr 03
2
Corrupt inodes on shared disk...
I am having problems when using a Dell PowerVault MD3000 with multipath
from a Dell PowerEdge 1950. I have 2 cables connected and mount the
partition on the DAS Array. I am using RHEL 4.4 with RHCS and a two
node cluster. Only one node is "Active" at a time, it creates a mount
to the partition, and if there is an issue RHCS will fence the device
and then the other node will mount the
2018 May 21
2
Bootstrap and average median squared error
Dear R-experts,
I am trying to bootstrap (and average) the median squared error evaluation metric for a robust regression. I can't get it. What is going wrong ?
Here is the reproducible example.
#############################
install.packages( "quantreg" )
library(quantreg)
crp <-c(12,14,13,24,25,34,45,56,25,34,47,44,35,24,53,44,55,46,36,67)
bmi
2007 Nov 22
3
anova planned comparisons/contrasts
Hi,
I'm trying to figure out how anova works in R by translating the
examples in Sokal And Rohlf's (1995 3rd edition) Biometry. I've hit a
snag with planned comparisons, their box 9.4 and section 9.6. It's a
basic anova design:
treatment <- factor(rep(c("control", "glucose", "fructose",
"gluc+fruct",
2010 Mar 09
1
create picture (k -the nearest neighbours)
Hi
I want to create a nice picture about my result of k -the nearest neighbours
algorithm. Here is my easy code:
#################################
library(klaR)
library(ipred)
library(mlbench)
data(PimaIndiansDiabetes2)
dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)]
dane[,2]=log(dane[,2])
dane[,1:2]=scale(dane[,1:2])
zbior.uczacy=sample(1:nrow(dane),nrow(dane)/2,F)
2023 Oct 31
0
Missing shapes in legend with scale_shape_manual
I believe the missing shapes are because you had set alpha=0 for the last geom point.
I expect there are better ways, but one way to handle it would be to avoid the filtering, adding columns with med and exercise status, like the following:
# setup with data provided
Date <- c('2023-10-17', '2023-10-16', '2023-10-15', '2023-10-14',