Displaying 20 results from an estimated 9000 matches similar to: "Variance-covariance matrix"
2008 Aug 06
1
Variance-covariance matrix for parameter estimates
Dear All,
I am currently working with the coxph function within the package survival.
I have the model h_ij = h_0(t) exp(b1x1 + b2x2) where the indicator
variables
are as follows:
x1 x2
VPS 0 0
LTG 1 0
TPM 0 1
[[alternative HTML version deleted]]
2009 May 04
1
Nelson-Aalen estimator of cumulative hazard
Hi,
I am computing the Nelson-Aalen (NA) estimate of baseline cumulative hazard in two different ways using the "survival" package. I am expecting that they should be identical. However, they are not. Their difference is a monotonically increasing with time. This difference is probably not large to make any impact in the application, but is annoyingly non-trivial for me to just
2011 Mar 25
2
A question on glmnet analysis
Hi,
I am trying to do logistic regression for data of 104 patients, which
have one outcome (yes or no) and 15 variables (9 categorical factors
[yes or no] and 6 continuous variables). Number of yes outcome is 25.
Twenty-five events and 15 variables mean events per variable is much
less than 10. Therefore, I tried to analyze the data with penalized
regression method. I would like please some of the
2017 Dec 20
1
Nonlinear regression
You also need to reply-all so the mailing list stays in the loop.
--
Sent from my phone. Please excuse my brevity.
On December 19, 2017 4:00:29 PM PST, Timothy Axberg <axbergtimothy at gmail.com> wrote:
>Sorry about that. Here is the code typed directly on the email.
>
>qe = (Qmax * Kl * ce) / (1 + Kl * ce)
>
>##The data
>ce <- c(15.17, 42.15, 69.12, 237.7, 419.77)
2008 Jan 05
1
Likelihood ratio test for proportional odds logistic regression
Hi,
I want to do a global likelihood ratio test for the proportional odds
logistic regression model and am unsure how to go about it. I am using
the polr() function in library(MASS).
1. Is the p-value from the likelihood ratio test obtained by
anova(fit1,fit2), where fit1 is the polr model with only the intercept
and fit2 is the full polr model (refer to example below)? So in the
case of the
2011 Dec 05
1
about interpretation of anova results...
quantreg package is used.
*fit1 results are*
Call:
rq(formula = op ~ inp1 + inp2 + inp3 + inp4 + inp5 + inp6 + inp7 +
inp8 + inp9, tau = 0.15, data = wbc)
Coefficients:
(Intercept) inp1 inp2 inp3 inp4
inp5
-0.191528450 0.005276347 0.021414032 0.016034803 0.007510343
0.005276347
inp6 inp7 inp8 inp9
0.058708544
2011 Oct 06
1
anova.rq {quantreg) - Why do different level of nesting changes the P values?!
Hello dear R help members.
I am trying to understand the anova.rq, and I am finding something which I
can not explain (is it a bug?!):
The example is for when we have 3 nested models. I run the anova once on
the two models, and again on the three models. I expect that the p.value
for the comparison of model 1 and model 2 would remain the same, whether or
not I add a third model to be compared
2004 Jun 11
1
comparing regression slopes
Dear List,
I used rlm to calculate two regression models for two data sets (rlm
due to two outlying values in one of the data sets). Now I want to
compare the two regression slopes. I came across some R-code of Spencer
Graves in reply to a similar problem:
http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg06666.html
The code was:
> df1 <- data.frame(x=1:10, y=1:10+rnorm(10))
2009 Jul 28
2
A hiccup when using anova on gam() fits.
I stumbled across a mild glitch when trying to compare the
result of gam() fitting with the result of lm() fitting.
The following code demonstrates the problem:
library(gam)
x <- rep(1:10,10)
set.seed(42)
y <- rnorm(100)
fit1 <- lm(y~x)
fit2 <- gam(y~lo(x))
fit3 <- lm(y~factor(x))
print(anova(fit1,fit2)) # No worries.
print(anova(fit1,fit3)) # Likewise.
print(anova(fit2,fit3)) #
2004 Dec 20
2
problems with limma
I try to send this message To Gordon Smyth at smyth at vehi,edu.au but it bounced
back, so here it is to r-help
I am trying to use limma, just downloaded it from CRAN. I use R 2.0.1 on Win XP
see the following:
> library(RODBC)
> chan1 <- odbcConnectExcel("D:/Data/mgc/Chips/Chips4.xls")
> dd <- sqlFetch(chan1,"Raw") # all data 12000
> #
> nzw <-
2009 Apr 08
2
Null-Hypothesis
Hello R users,
I've used the following help two compare two regression line slopes.
Wanted to test if they differ significantly:
Hi,
I've made a research about how to compare two regression line slopes
(of y versus x for 2 groups, "group" being a factor ) using R.
I knew the method based on the following statement :
t = (b1 - b2) / sb1,b2
where b1 and b2 are the two slope
2011 Jan 26
2
Extracting the terms from an rpart object
Hello all,
I wish to extract the terms from an rpart object.
Specifically, I would like to be able to know what is the response variable
(so I could do some manipulation on it).
But in general, such a method for rpart will also need to handle a "." case
(see fit2)
Here are two simple examples:
fit1 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)
fit1$call
fit2 <-
2010 Sep 21
1
package gbm, predict.gbm with offset
Dear all,
the help file for predict.gbm states that "The predictions from gbm do not
include the offset term. The user may add the value of the offset to the
predicted value if desired." I am just not sure how exactly, especially for
a Poisson model, where I believe the offset is multiplicative ?
For example:
library(MASS)
fit1 <- glm(Claims ~ District + Group + Age +
2008 Apr 17
1
survreg() with frailty
Dear R-users,
I have noticed small discrepencies in the reported estimate of the
variance of the frailty by the print method for survreg() and the
'theta' component included in the object fit:
# Examples in R-2.6.2 for Windows
library(survival) # version 2.34-1 (2008-03-31)
# discrepancy
fit1 <- survreg(Surv(time, status) ~ rx + frailty(litter), rats)
fit1
fit1$history[[1]]$theta
2011 Apr 02
3
Plotting MDS (multidimensional scaling)
Hi,
I just encountered what I thought was strange behavior in MDS. However, it
turned out that the mistake was mine. The lesson learned from my mistake is
that one should plot on a square pane when plotting results of an MDS. Not
doing so can be very misleading. Follow the example of an equilateral
triangle below to see what I mean. I hope this helps others to avoid this
kind of headache.
2011 Jan 05
1
Comparing fitting models
Dear all,
I have 3 models (from simple to complex) and I want to compare them in order to
see if they fit equally well or not.
From the R prompt I am not able to see where I can get this information.
Let´s do an example:
fit1<- lm(response ~ stimulus + condition + stimulus:condition, data=scrd)
#EQUIVALE A lm(response ~ stimulus*condition, data=scrd)
fit2<- lm(response ~ stimulus +
2005 Jun 15
1
anova.lme error
Hi,
I am working with R version 2.1.0, and I seem to have run into what looks
like a bug. I get the same error message when I run R on Windows as well as
when I run it on Linux.
When I call anova to do a LR test from inside a function, I get an error.
The same call works outside of a function. It appears to not find the right
environment when called from inside a function. I have provided
2009 Apr 24
2
prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)
Hi all,
I was wondering if there is a function out there, or someone has written code for making confidence intervals around model averaged predictions (y~á+âx). The model average estimates are from the dRedging library?
It seems a common thing but I can't seem to find one via the search engines
Examples of the models are:
fit1 <- glm(y~ dbh, family = binomial, data = data)
fit2 <-
2010 Mar 17
1
accessing info in object slots from listed objects using loops
Hey,
I have stacked a couple of garchFit objects in a list with names $fit1,
$fit2, ..., $fiti assigning objects names using a loop, i.e. after running
the loop modelStack = list($fit1, $fit2,...,$fiti).
Thus the following apply;
a = modelStack$fit2, then a is the second garchFit object of formal class
'fGarch' with 11 slots, @call, @formula... etc.
I then want to extract information in
2018 Jan 17
1
Assessing calibration of Cox model with time-dependent coefficients
I am trying to find methods for testing and visualizing calibration to Cox
models with time-depended coefficients. I have read this nice article
<http://journals.sagepub.com/doi/10.1177/0962280213497434>. In this paper,
we can fit three models:
fit0 <- coxph(Surv(futime, status) ~ x1 + x2 + x3, data = data0) p <-
log(predict(fit0, newdata = data1, type = "expected")) lp