Displaying 20 results from an estimated 44 matches for "cholesterol".
2005 Aug 22
1
How to add legend of plot.Design function (method=image)? (if (!.R.) )
Hi,
When running
z <- plot(fit, age=NA, cholesterol=NA, perim=boundaries, method='image')
Legend(z, fun=plogis, at=qlogis(c(.01,.05,.1,.2,.3,.4,.5)),
zlab='Probability')
And after pointing the cursor to the plot() screen in R, I obtain the
following message:
Using function "locator(2)" to place opposite corners o...
2010 Jul 31
3
I have a problem
dear£º
in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by red line.And how to compile the program(L <- .4*(sex=='male') + .045*(age-50) +
(log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))).
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 25)
sex <- factor(sample(c('female','m...
2018 Jan 03
1
summary.rms help
Dear All,
using the example from the help of summary.rms
library(rms)
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 25)
sex <- factor(sample(c('female','male'), n,TRUE))
label(age) <- 'Age' # label is in Hmisc
label(cholesterol) <- 'Total Cholesterol'
label(blood.pressure) <- 'Systolic Blood Pressure'
la...
2002 Sep 13
1
design package (plot problems)
...other mask problem?, but
label from xtable which was my first problem
is now off !
Thanks for advance & regards,
Christian
$ n <- 1000 # define sample size
$ set.seed(17) # so can reproduce the results
$ age <- rnorm(n, 50, 10)
$ blood.pressure <- rnorm(n, 120, 15)
$ cholesterol <- rnorm(n, 200, 25)
$ sex <- factor(sample(c('female','male'), n, T))
$ label(age) <- 'Age'
$ label(cholesterol) <- 'Total Cholesterol'
$ label(blood.pressure) <- 'Systolic Blood Pressure'
$ label(sex) &...
2018 Feb 14
0
Unexpected behaviour in rms::lrtest
...acksolve
>
> ### Code below that generates the data taken from the
> ### help page for lrm()
>
> n <- 1000 # define sample size
> set.seed(17) # so can reproduce the results
> age <- rnorm(n, 50, 10)
> blood.pressure <- rnorm(n, 120, 15)
> cholesterol <- rnorm(n, 200, 25)
> sex <- factor(sample(c('female','male'), n,TRUE))
> label(age) <- 'Age' # label is in Hmisc
> label(cholesterol) <- 'Total Cholesterol'
> label(blood.pressure) <- 'Systolic Blo...
2010 Aug 14
1
How to add lines to lattice plot produced by rms::bplot
...llis"). It is similar to this plot
produced by a very minor modification of the first example on the
bplot help page:
requiere(rms)
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 25)
sex <- factor(sample(c('female','male'), n,TRUE))
label(age) <- 'Age' # label is in Hmisc
label(cholesterol) <- 'Total Cholesterol'
label(blood.pressure) <- 'Systolic Blood Pressure'
label(s...
2008 May 29
2
Troubles plotting lrm output in Design Library
...ers,
I'm having a problem in using plot.design in Design Library. Tho
following example code produce the error:
> n <- 1000 # define sample size
> set.seed(17) # so can reproduce the results
> age <- rnorm(n, 50, 10)
> blood.pressure <- rnorm(n, 120, 15)
> cholesterol <- rnorm(n, 200, 25)
> sex <- factor(sample(c('female','male'), n,TRUE))
> label(age) <- 'Age' # label is in Hmisc
> label(cholesterol) <- 'Total Cholesterol'
> label(blood.pressure) <- 'Systolic Blood P...
2005 Aug 22
0
How to add legend of plot.Design function ( method=image)?
...in setting)
but this didn’t solve it.
How can this be solved?
Thanks a lot,
Jan
library(Design)
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 25)
sex <- factor(sample(c('female','male'), n,TRUE))
label(age) <- 'Age' # label is in Hmisc
label(cholesterol) <- 'Total Cholesterol'
label(blood.pressure) <- 'Systolic Blo...
2010 Oct 06
2
A problem --thank you
dear:teacher
i have a problem which about the polr()(package "MASS"), if the response must have 3 or more levels?
and how to fit the polr() to 2 levels?
thank you.
turly yours
[[alternative HTML version deleted]]
2011 Jan 26
2
2 functions with same name - what to do to get the one I want
....
Tried to instal Hmisc but got this message, so I assume I have it
> utils:::menuInstallPkgs()
Warning: package 'Hmisc' is in use and will not be installed
ran the demo from Hmisc with no luck...
> set.seed(1)
> ch <- rnorm(1000, 200, 40)
> ecdf(ch, xlab="Serum Cholesterol")
Error in ecdf(ch, xlab = "Serum Cholesterol") :
unused argument(s) (xlab = "Serum Cholesterol")
ran the sample code from stats and it worked...
> x <- rnorm(12)
> Fn <- ecdf(x)
> Fn # a *function*
Empirical CDF
Call: ecdf(x)
x[1:12] = -1.9123,...
2009 Jul 17
1
c-index validation from Design library
Hi Group,
I have a question about obtaining the bias-corrected c-index using
validate from the Design library.
As an example, consider the example from help page:
library(Design)
?validate.lrm
n <- 1000
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 25)
sex <- factor(sample(c('female','male'), n,TRUE))
L <- .4*(sex=='male') + .045*(age-50) + (log(cholesterol -
10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))
y <- ifelse(runif(n) < plogis(L), 1, 0)
f <-...
2006 Mar 09
1
bugs in simtest (PR#8670)
...e answer that simtest is giving.
## Here is another example, this time using one of your datasets.
## Again, the p.Bonf and p.adj differ. Again, the t.values for the
## simtest have the wrong sign.
## This is from
## c:/Program Files/R/R-2.2.1/library/multcomp/R-ex/Rex.zip/simtest.R
> data(cholesterol)
>
> # adjusted p-values for all-pairwise comparisons in a one-way
> # layout (tests for restricted combinations)
> simtest(response ~ trt, data=cholesterol, type="Tukey", ttype="logical")
Simultaneous tests: Tukey contrasts
Call:
simtest.formula(formula...
2010 Dec 09
1
Calculating odds ratios from logistic GAM model
Dear R-helpers
I have a question related to logistic GAM models. Consider the following
example:
# Load package
library(mgcv)
# Simulation of dataset
n <- 1000
set.seed(0)
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 25)
sex <- factor(sample(c('female','male'), n,TRUE))
L <- 0.4*(sex=='male') + 0.045*(age-50) + (log(cholesterol -
10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))
y <- ifelse(runif(n) < plogis(L), 1, 0)
I now...
2008 Jul 31
0
multiple comparison
...;Ksub" in the code). Therefore I run 2 other cases
along with the original example (case 1), with the expectation I'll get the
point from the output. The three cases only differ in the index I gave for
"Ksub".
### Script start####
library(mvtnorm)
library(multcomp)
data("cholesterol")
summary(cholesterol)
### adjusted p-values for all-pairwise comparisons in a one-way layout
### set up ANOVA model
amod <- aov(response ~ trt, data = cholesterol)
### set up multiple comparisons object for all-pair comparisons
cht <- glht(amod, linfct = mcp(trt = "Tukey"))...
2008 Apr 17
1
Error in Design package: dataset not found for options(datadist)
Hi,
Design isn't strictly an R base package, but maybe someone can explain
the following.
When lrm is called within a function, it can't find the dataset dd:
> library(Design)
> age <- rnorm(30, 50, 10)
> cholesterol <- rnorm(30, 200, 25)
> ch <- cut2(cholesterol, g=5, levels.mean=TRUE)
> fit <- function(ch, age)
+ {
+ d <- data.frame(ch, age)
+ dd <- datadist(d)
+ options(datadist="dd")
+ lrm(ch ~ age, data=d, x=TRUE, y=TRUE)
+ }
> fit(ch, age)
Error in Design(e...
2011 Aug 18
1
Using mixed models to analyze Longitudinal intervention
Dear R List,
I am trying to use mixed models to analyze an intervention and want to make
sure I am doing it correctly. The intervention is for lowing cholesterol
and there are two groups: one with an intervention and one without. The
subjects were evaluated a differing amount of time, so there were between 2
and 7 visits, equally spaced.
Sample output is below. TC is total cholesterol, group.minus.1 is the
intervention indicator and Study.Number is the s...
2008 Jan 16
1
Probability weights with density estimation
...at file was a snap. It
consists of demographic data linked to laboratory measurements. Each
subject has an associated sampling weight. I have gotten informative
displays following the examples using kde2d() in V&R MASSe2 (more
thanks), but these were unweighted analyses. The ratio of total
cholesterol (TC) to HDL cholesterol is used clinically to estimate risk
of future heart disease, and I am looking at how such ratios "divide"
or intersect with the TC x HDL-C distribution. Rather than include all
the real data, let me just post a simulation that shows a contourplot
reasonably sim...
2003 Mar 13
0
Repeated measures 2-way anova -- robustness question
I'm a journalist, wondering what questions to ask about a study that
contrasted the impact on serum cholesterol of two drugs. This was a
40 dog study: 5 treatment blocks of 4 dogs each, randomized to: a
control block, two blocks at different doses of drug1 and two at
corresponding doses of drug2. Analysis was 2-factor repeated measures
ANOVA on treatment group and sampling time. Linear contrast tests
look...
2010 Jul 29
1
I need the dataset--thank you
dear:
I am a user of R project.And now ,I have a problem.
I want to know what is the name of the datasets in the web page--"Draw a Nomogram Representing a Regression Fit" which come from the R-home(http://www.r-project.org/ Package rms version 3.0-0).
And can you supply the dataset to me?
wish for your help,thank you!
2010 Oct 09
1
question related to multiple regression
Hi,
I am conducting an association analysis of genotype and a phenotype such as
cholesterol level as an outcome and the genotype as a regressor using
multiple linear regression. There are 3 possibilities for the genotype AA,
AG, GG. There are 5 people with the AA genotype, 100 with the AG genotype
and 900 with the GG genotype. I coded GG genotype as 1, AG as 2 and AA as 3
and the p-value...