Displaying 20 results from an estimated 1000 matches similar to: "Plotting confidence bands around regression line"
2011 Mar 23
2
Estimating correlation in multiple measures data
Dear R-helpers,
This may sound simple to you, but I'm a beginner in this, so please be
forgiving.
I have a following problem: two analytes were measured in patient's
blood on 4 occasions: ProteinA and ProteinB. How to correctly evaluate
correlation between ProteinA and ProteinB?
I tried:
x <- data.frame(Patient.ID=rep(1:10, each=4), Visit=rep(c(1:4),10),
ProteinA=rnorm(m=10,
2010 Mar 30
5
Problem comparing hazard ratios
Dear R-Helpers,
I am a novice in survival analysis. I have the following code:
for (i in 3:12) print(coxph(Surv(time, status)~a[,i], data=a))
I used it to fit the Cox Proportional Hazard models separately for every
available parameter (columns 3:12) in my data set - with intention to
compare the Hazard Ratios.
However, some of my variables are in range 0.1 to 1.6, others in range
5000 to
2010 May 26
3
Problem with plotting survival predictions from cph model
Dear R-helpers,
I am working with 'cph' models from 'rms' library. When I build simple
survival models, based on 'Surv(time, event)', everything is fine and I
can make nice plots using plot(Predict(f, time=3)).
However, recently I tried to be more specific and used 'Surv(start,
stop, event)' type model. Using this model 'plot(Predict(f))' works OK,
but
2009 Aug 05
1
Starting NONMEM (nmfe6) from R
Hello,
I have made an R script that prepares a NONMEM dataset and I would like
to start the NONMEM run right after the dataset is ready.
I am using windows XP, R 2.9.1 and NONMEM 6.
I have prepared a run.bat file that looks like this:
----------------------------------------
call K:\nmvi\NMdirectories.bat
call K:\nmvi\nmfe6 "path\control.txt" "path\output.txt"
2012 May 02
2
Problem with 'nls' fitting logistic model (5PL)
Dear R-Helpers,
I'm working with immunoassay data and 5PL logistic model. I wanted to
experiment with different forms of weighting and parameter selection,
which is not possible in instrument software, so I turned to R.
I am using R 2.14.2 under Win7 64bit, and the 'nls' library to fit the
model - I started with the same model and weighting type (1/y) as in the
instrument to see
2010 Oct 21
1
Big data (over 2GB) and lmer
Dear R-helpers
I have a data set of roughly 10 million records, 7 columns. It has only
about 500MB as a csv, so it fits in the memory. It's painfully slow to
do anything with it, but it's possible. I also have another dataset of
covariates that I would like to explore - with about 4GB of data...
I would like to merge the two datasets and use lmer to build a mixed
effects model. Is
2008 Jun 10
1
Problem with by(... , median)
Hello everyone,
I am new to R, I have been using SAS for a while. Not surprisingly, I
find R much better in graphics, which is publication ready right away.
Recently, I have been trying to calculate some basic statistics using R.
I have a dataset of multiple rows per subject. For example:
Subject Date Factor1 Factor2 Factor3
P1 0.5 1 1 3
P1 1 3 2 5
P1 2 3 5 NA
...
P2 0.5 1 6 4
P2 1 2 NA 7
P2
2010 Apr 29
1
How to estimate the residual SD for each sample separately in mixed-effects model?
Dear R-helpers,
I am developing a Mixed-Effects model for a study of immunoassays using
'lme4' library. The study design is as follows: 10 samples were run
using 7 different immunoassays, 3 times each, in duplicates. Data
attached. I have developed the following model:
c.lme <- lmer(Result~SPL + (SPL|Assay/Run) -1, data=data)
This model has excellent predictions - the Rsquared of
2010 Jan 15
1
'nlme' library - lme function results
Dear R-helpers
I am running a simple mixed effects model using lme(). The call looks
like this:
fit <- lme(Analyte~Sample, data=Data, random=~1 | Run)
I am particularly interested in the estimated random effects. When I
print the 'fit' object, it looks something like example below:
(...)
Random effects:
Formula: ~1 | Run
(Intercept) Residual
StdDev: 3.483794 3.637523
2008 Jul 21
5
Coefficients of Logistic Regression from bootstrap - how to get them?
Hello all,
I am trying to optimize my logistic regression model by using bootstrap.
I was previously using SAS for this kind of tasks, but I am now
switching to R.
My data frame consists of 5 columns and has 109 rows. Each row is a
single record composed of the following values: Subject_name, numeric1,
numeric2, numeric3 and outcome (yes or no). All three numerics are used
to predict
2008 Oct 17
2
Beginner's question: number formatting
Hello R-helpers,
I have a problem with formatting a single number to show leading zeros.
For example, I want "2" displayed as "002".
My numbers have 1 to 3 digits and I would like them all to display 3
digits for printing. I know I could use "paste" in a loop with several
"if"s, but I was wondering if there is a single function that can do this.
I have
2005 Sep 28
1
confidence variability bands for kernel estimators
I'm using nonparametric regression (packeges ksmooth and ks). My question:
is there any way to compute confidence bands (or variability bands) with R.
Confidence bands for functions are intervals [CLO(x);CUP(x)] such that with
probability 1-alpha the true curve is covered by the band [CLO(x);CUP(x)].
Thanks very much for any help you can offer.
Michael G??lger
2006 Oct 20
2
plotting 95% confidence bands on a simple linear regression model from lm()
What's the best / simplest way to create 95% confidence bands for a
model created with lm() that can be plotted around teh regression
line? I've looked everywhere for this - I guess I must be missing
something.
- Jason
2008 Jun 17
1
Simultaneous Confidence/Prediction Bands
Is there a built-in function in R that will generate simultaneous confidence
and prediction bands for linear regression?
Tom
--
View this message in context: http://www.nabble.com/Simultaneous-Confidence-Prediction-Bands-tp17941537p17941537.html
Sent from the R help mailing list archive at Nabble.com.
2012 Dec 03
1
Confidence bands with function survplot
Dear all,
I am trying to plot KM curves with confidence bands with function survplot under package rms.
However, the following codes do not seem to work. The KM curves are produced, but the confidence bands are not there.
Any insights? Thanks in advance.
library(rms)
########data generation############
n <- 1000
set.seed(731)
age <- 50 + 12*rnorm(n)
label(age) <- "Age"
2007 Jun 08
1
pointwise confidence bands or interval values for a non parametric sm.regression
Dear all,
Is there a way to plot / calculate pointwise confidence bands or
interval values for a non parametric regression like sm.regression?
Thank you in advance.
Regards,
Martin
2009 Apr 23
0
How to construct confidence bands from a gls fit?
Dear R-list,
I would like to show the implications of estimating a linear trend to
time series,
which contain significant serial correlation.
I want to demonstrate this, comparing lm() and an gls() fits, using
the LakeHuron
data set, available in R.
Now in my particular case I would like to draw confidence bands on the plot and
show that there are differences. Unfortunately, I do not know how to
2008 Jul 16
0
Confidence bands for model estimates using ns() spline basis
Hi,
I am using ns() to model the effect of time on some outcome y
[ specifically, I am using polr() in a model of the form
mod1=polr(y~x1+x2*ns(Year,df=3),...) , with x1 and x2 denoting several
covariates each ]
I understand how to use the spline basis as recorded in the model matrix in
order to reproduce the model fit and to generate curves of the point
estimates of the time effect,
2009 Jun 16
1
Confidence Bands in Polynomial Regression
Hello R users,
Given a linear (in the parameters) regression model where one predictor x
interacts with time and time*time (ie, a quadratic effect of time t):
y = b0 + b1(x) + b2(t) + b3(t^2) + b4(x*t) + b5(x*t^2) + e,
I would like to construct 95% confidence bands (optimally, shaded) around
this function:
*dy* = b1 + b4(t) + b5(t^2)
*dx*
That is, the partial effect of x on y changing over
2010 Aug 02
1
Confidence Bands in nonlinear regression using optim and maximum likelihood
Hello,
I am trying to plot confidence bands on the mean and prediction bands for the following
nonlinear regression, using maximum likelihood via optim. A toy example with data and
code of what I am trying to accomplish is:
VOL<-c(0.01591475, 1.19147935 ,6.34102460, 53.68809287, 91.90143074, 116.21397007,
146.41843056, 215.64535337, 256.53149673, 315.73609232)
Age <-c(1.622222, 2.833333