Displaying 20 results from an estimated 600 matches similar to: "fit data with y = x^-1"
2010 Oct 15
1
Problem using BRugs
Hi R users,
I am trying to call openbugs from R. And I got the following error message:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
model is syntactically correct
expected the collection operator c error pos 8 (error on line 1)
variable ww is not defined in model or in data set
[1] "C:\\DOCUME~1\\maomao\\LOCALS~1\\Temp\\RtmpqJk9R3/inits1.txt"
2012 Jul 02
1
apply with multiple conditions
Hello all,
I have written a for loop to act on a dataframe with close to 3million rows
and 6 columns and I would like to pass it to apply() to speed the process up
(I let the loop run for 2 days before stopping it and it had only gone
through 200,000 rows) but I am really struggling to find a way to pass the
arguments. Below are the loop and the head of the dataframe I am working on.
Any hints
2013 Apr 09
2
R crash
I have a generalized linear model to solve. I used package "geepack". When
I use the correlation structure "unstructured", I get a messeage that- R
GUI front-end has stopped working. Why this happens? What is the solution?
The r codes are as follows:
a<-read.table("d:/bmt.txt",header=T")
2012 Nov 08
2
Comparing nonlinear, non-nested models
Dear R users,
Could somebody please help me to find a way of comparing nonlinear, non-nested
models in R, where the number of parameters is not necessarily different? Here
is a sample (growth rates, y, as a function of internal substrate
concentration, x):
x <- c(0.52, 1.21, 1.45, 1.64, 1.89, 2.14, 2.47, 3.20, 4.47, 5.31, 6.48)
y <- c(0.00, 0.35, 0.41, 0.49, 0.58, 0.61, 0.71, 0.83, 0.98,
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)) #
2005 Apr 23
1
question about about the drop1
the data is :
>table.8.3<-data.frame(expand.grid( marijuana=factor(c("Yes","No"),levels=c("No","Yes")), cigarette=factor(c("Yes","No"),levels=c("No","Yes")), alcohol=factor(c("Yes","No"),levels=c("No","Yes"))), count=c(911,538,44,456,3,43,2,279))
2011 Sep 12
1
coxreg vs coxph: time-dependent treatment
Dear List,
After including cluster() option the coxreg (from eha package)
produces results slightly different than that of coxph (from survival)
in the following time-dependent treatment effect calculation (example
is used just to make the point). Will appreciate any explaination /
comment.
cheers,
Ehsan
############################
require(survival)
require(eha)
data(heart)
# create weights
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 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 May 22
1
bug in rpart?
Greetings,
I checked the Indian diabetes data again and get one tree for the data with
reordered columns and another tree for the original data. I compared these
two trees, the split points for these two trees are exactly the same but the
fitted classes are not the same for some cases. And the misclassification
errors are different too. I know how CART deal with ties --- even we are
using the
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
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
2010 Jul 31
2
Is profile.mle flexible enough?
Hi the list,
I am experiencing several issues with profile.mle (and consequently with
confint.mle) (stat4 version 2.9.2), and I have to spend a lot of time to
find workarounds to what looks like interface bugs. I would be glad to
get feedback from experienced users to know if I am really asking too
much or if there is room for improvement.
* Problem #1 with fixed parameters. I can't
2010 Sep 09
5
Highlighting a few bars in a barplot
Hello,
I have a bar plot where I am already using colour to distinguish one set
of samples from another. I would also like to highlight a few of these
bars as ones that should be looked at in detail. I was thinking of
using hatching, but I can't work out how or if you can have a background
colour and hatching which is different between bars. Any suggestions on
how I should do this?
Thanks
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 Feb 26
2
Error in mvpart example
Dear all,
I'm getting an error in one of the stock examples in the 'mvpart' package. I tried:
require(mvpart)
data(spider)
fit3 <- rpart(gdist(spider[,1:12],meth="bray",full=TRUE,sq=TRUE)~water+twigs+reft+herbs+moss+sand,spider,method="dist") #directly from ?rpart
summary(fit3)
...which returned the following:
Error in apply(formatg(yval, digits - 3), 1,
2006 Jan 02
1
Use Of makeARIMA
Hi R-Experts,
Currently I'm using an univariate time series in which I'm going to
apply KalmanLike(),KalmanForecast (),KalmanSmooth(), KalmanRun(). For I
use it before makeARIMA () but I don't understand and i don't know to
include the seasonal coefficients. Can anyone help me citing a suitable
example? Thanks in advance.
------------------------------------------
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
2010 Sep 03
2
density() with confidence intervals
Hello R users & R friends,
I just want to ask you if density() can produce a confidence interval, indicating how "certain" the density() line follows the true frequency distribution based on the sample you feed into density().
I've heard of loess.predict(loess(y ~ x), se=TRUE) which gives you a SE estimate of the smoothed scatterplot - but density() kernel smoothing is not the
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 +