Displaying 20 results from an estimated 45 matches for "glucose".
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 separately for each day. I'm sure I...
2013 Jan 07
3
renumber a list of numbers
...2L, 2L, 2L, 2L), .Label = c("NO", "YES"
), class = "factor"), Event_name = c(8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 33, 34, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30), Glucose.n = c(26, 3,
0, 26, 1, 25, 26, 25, 25, 26, 26, 25, 23, 23, 24, 24, 26, 26,
25, 25, 26, 26, 24, 21, 7, 12, 4, 0, 0, 4, 0, 4, 4, 4, 4, 4,
4, 4, 3, 4, 4, 4, 3, 3, 2, 2, 2, 1, 1), Glucose.m = c(92.5,
90.3333333333333,
NaN, 97.2307692307692, 116, 97.84, 107.653846153846, 105.32,
102.6, 94.6538461538462,...
2003 Sep 26
3
Std. errors of intercept and slope
...g 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)
Coefficients:
(Intercept) blood.glucose
1.09781 0.02196
> summary(lm(short.velocity~blood.glucose))
Call:
lm(formula = short.velocity ~ blood.glucose)
Residuals:
Min 1Q Median 3Q Max
-0.40141 -0...
2007 Nov 14
2
Help with Bartlett's test on linear model
...nd 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 the example in Dalgaard's book.
I know var.test works fine but I want to learn how to use the Bartlett's
test.
> hellung$glucose <- factor(hellung$glucose, labels=c("Yes","No"))
> attach(hellung)
> tethym.gluc <- hellung[glucose=="Yes",]
> tethym.nogluc <- hellung[glucose=="No",]
> lm.nogluc <- lm(log10(diameter)~log10(conc), data=tethym.nogluc)
> lm.glu...
2018 Apr 25
0
Zero errors : Bug in my R code ?
...at.wmich.edu/mckean/Stat666/Pkgs/npsmReg2_0.1.1.tar.gz')
#install.packages("DMwR")
library(robustbase)
library(MASS)
library(quantreg)
library(RobPer)
library(hbrfit)
library("devtools")
library("DMwR")
bmi=c(23,43,12,1,23,4,3,4,5,5,6,5,5,34,67,87,32,12,23,19)
glucose=c(98,34,21,13,2,43,16,43,28,93,11,14,16,43,23,65,42,16,54,32)
crp=c(56,34,42,32,1,2,54,47,67,65,38,95,45,76,67,87,35,41,34,54)
newdata=data.frame(bmi,glucose,crp)
?
reg1 <- lm( crp ~ bmi+glucose,data=newdata)
DMwR::regr.eval(newdata$crp,reg1$fitted.values)
reg <- lmrob( crp ~ bmi+glucose,dat...
2018 May 21
2
Bootstrap and average median squared error
...et 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 <-c(34,32,12,76,54,34,21,18,92,32,11,13,45,46,56,57,67,87,12,13)
glucose <-c(23,54,11,12,13,21,32,12,45,54,65,87,21,23,12,12,23,23,43,54)
# Create a list to store the results
lst<-list()
# Numbers of bootstrap samples
nboot=100
bootstrap.MedAESQ =rep(NA,nboot)
for(i in 1?:nboot)
{
fit <- rq( crp ~ bmi+glucose, tau = 0.5)
ypred=predict(fit)
y=new$crp
bootst...
2009 Oct 27
1
"ipredknn" - How may I find values?
...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)
klasyfikatorKNN=ipredknn(diabetes~glucose+insulin,data=dane,subset=zbior.uczacy,k=3)
oceny=predict(klasyfikatorKNN,dane[-zbior.uczacy,],"class")
#data frames with my result from klasyfikatorKNN
df=data.frame(glucose=c(klasyfikatorKNN$learn$X[,1]),insulin=klasyfikatorKNN$learn$X[,2],diabetes=c(klasyfikatorKNN$learn$y))
#And pic...
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 <- data.frame(crp, bmi, glucose)
nboot <- 100
medse <- boot(dat, bootMedianSE, R = nboot)
medse$t0
mean(medse$t) # This is the value you want
Hope this helps,
Rui Barradas
On 5...
2018 May 22
2
Bootstrap and average median squared error
...f 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 <- data.frame(crp, bmi, glucose)
> nboot <- 100
>
> medse <- boot(dat, bootMedianSE, R = nboot)
>
> medse$t0
> mean(medse$t)??? # This is...
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 leads to a...
2007 Oct 19
2
In a SLR, Why Does the Hat Matrix Depend on the Weights?
...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)
summary(fit)
hatvalues(fit)
W <- 1/blood.glucose
fit.w <- lm(short.velocity ~ blood.glucose,weights=W)
summary(fit.w)
hatvalues(fit.w)
Thanks for the help.
Tom
[[alternative HTML version deleted]]
2007 Nov 22
3
anova planned comparisons/contrasts
...,
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", "sucrose"), each = 10))
length <- c(75, 67, 70, 75, 65, 71, 67, 67, 76, 68,
57, 58, 60, 59, 62, 60, 60, 57, 59, 61,
58, 61, 56, 58, 57, 56, 61, 60, 57, 58,
58, 59, 58, 61, 57,...
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 misclassification tables are
different too. I did not change the data, but why the results are so
different?
Does anyone know how rpart deal with ties?
Here is the codes...
2010 Mar 09
1
create picture (k -the nearest neighbours)
...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)
KNN=ipredknn(diabetes~glucose+insulin,data=dane,subset=zbior.uczacy,k=3)
KNN=ipredknn(diabetes~glucose+insulin,data=dane,subset=zbior.uczacy,k=3)
b= ifelse((a==1),'red','blue' )
a=as.numeric(KNN$learn$y)
plot(KNN$learn$X[,1], KNN$learn$X[,2],pch=a,col = ifelse((a==1),'red','blue'
))
##########...
2011 Nov 11
3
COPILOT Glucose Meter COM problem
...e used commands like the following to be certain that I have an active com port:
dmesg | grep ttyS
rm com1
ln -s /dev/ttyS0 com1
So I suspect the solution lies somewhere in WINE.
If all else fails I will get a USB to SERIAL converter cable and try that.
My wife has an Abbott Labs Freestyle Lite Glucose meter which uploads to a program called COPILOT via RS232. I was only able to get it to work on ONE of our three Windows XP machines. I tried all day to get it to work on a Dell XP converted to Ubuntu (Gnu/Linux) which d...oes have an RS232 and TERMINAL commands indicate that the system recognizes...
2009 Mar 05
1
ANOVA
Hi All,
I have about one hundred patients and all the patients had their glucose
measured on three different days. The days are all the same for all he
patients. So I have three measurement for each patient . I want to know
whether the day when the glucose was measured has an effect on the
measurements. I was thinking to use a single factor analysis of variance but
I am not sur...
2010 May 13
1
What's data() for?
Hi there,
>library(faraway)
>pima
pregnant glucose diastolic triceps insulin bmi diabetes age test
1 6 148 72 35 0 33.6 0.627 50 1
2 1 85 66 29 0 26.6 0.351 31 0
>data(pima)
>pima
pregnant glucose diastolic triceps insulin bmi diabetes age test
1 6...
2018 May 22
1
Bootstrap and average median squared error
Hello,
Right!
I copied from the OP's question without thinking about it.
Corrected would be
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)
}
Sorry,
rui Barradas
On 5/22/2018 11:32 AM, Daniel Nordlund wrote:
> On 5/22/2018 2:32 AM, Rui Barradas wrote:
>> bootMedianSE <- function(data, indices){
>> ????? d <- data[in...
2023 Oct 30
1
Missing shapes in legend with scale_shape_manual
Hello,
I'm trying to plot a graph of blood glucose versus date. I also record
conditions, such as missing the previous night's medications, and
missing exercise on the previous day. My data looks like:
> b2[68:74,]
# A tibble: 7 ? 5
Date Time bg missed_meds no_exercise
<date> <time> <dbl> <lgl>...
2009 Dec 31
1
How to interpret some diagnostic output
...ean.
An interprestion or suggestion would be greatly
appreciated.
Running on Kubuntu using
R version 2.6.2 (2008-02-08)
PS: I'm obviously a newbie and this script is my first serious
attempt at using R.
R text follows: --------------------
source("dbi-start.R")
am_pm<-"PM Glucose for"
fc_year<-2008
bfc_head<-"select blood.sugar from blood where"
bfc_PM<-"blood.time>\"22:00:00\" and blood.time<=\"23:59:00\""
bfc_tail<-"order by blood.date,blood.time"
bfc<-"blood.date"
nmon<-c(2:12,1)
ls...