Displaying 20 results from an estimated 130 matches similar to: "How can I fixe convergence=1 in optim"
2006 Jun 13
2
Garch Warning
Dear all R-users,
I wanted to fit a Garch(1,1) model to a dataset by:
>garch1 = garch(na.omit(dat))
But I got a warning message while executing, which is:
>Warning message:
>NaNs produced in: sqrt(pred$e)
The garch parameters that I got are:
> garch1
Call:
garch(x = na.omit(dat))
Coefficient(s):
a0 a1 b1
1.212e-04 1.001e+00 1.111e-14
Can any one
2012 Aug 22
1
Error in if (n > 0)
I've searched the Web with Google and do not find what might cause this
particular error from an invocation of cenboxplot:
cenboxplot(cu.t$quant, cu.t$ceneq1, cu.t$era, range=1.5, main='Total
Recoverable Copper', ylab='Concentration (mg/L)', xlab='Time Period')
Error in if (n > 0) (1L:n - a)/(n + 1 - 2 * a) else numeric() :
argument is of length zero
I do
2013 Apr 11
2
Read the data from a text file and reshape the data
I have a data set for different time intervals. The data has three comment
lines before data for each time interval. For each time interval there are
500 data points. I want to change the dataset such that I have the following
format:
t1 t2 t3 ................
0.00208 0.00417 0.00625 .................
a1 a2 a3 ...................
2008 Jun 19
1
PrettyR (describe)
#is there a way to get NA in the table of descriptive statistics instead of
the function stopping Thank you in advance
#data
x.f <- structure(list(Site = structure(c(9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L), .Label = c("BC", "HC", "RM119", "RM148", "RM179",
"RM185",
2010 Jul 15
2
taking daily means from hourly data
I have a data frame (morgan) of hourly river flow, river levels and wind direction and speed thus:
Time hour lev.morgan lev.lock2 lev.lock1 flow direction velocity
1 2009-07-06 15:00:00 15 3.266 3.274 3.240 1710.6 180.282 4.352
2 2009-07-06 16:00:00 16 3.268 3.272 3.240 1441.8 192.338 5.496
3 2009-07-06 17:00:00 17 3.268
2009 Aug 02
3
two-factor linear models with missing cells
I am wondering how to interpret the parameter estimates that lm()
reports in this sort of situation:
y = round(rnorm(n=24,mean=5,sd=2),2)
A = gl(3,2,24,labels=c("one","two","three"))
B = gl(4,6,24,labels=c("i","ii","iii","iv"))
# Make both observations for A=1, B=4 missing
y[19] = NA
y[20] = NA
data.frame(y,A,B)
nonadd = lm(y ~
2006 Jan 31
11
ez_where plugin updated features.
Friends-
I wanted to let people know that there is a new experimental release
of this plugin. I would love feedback on syntax and features. There
is now a full test suite with fixtures that covers all the available
syntax. Look at the test suite for more syntax possibilities. There
have been many additions since my last release. Fabien Atelier has
been working on this with me and has
2011 Aug 30
2
ARMA show different result between eview and R
When I do ARMA(2,2) using one lag of LCPIH data
This is eview result
>
> *Dependent Variable: DLCPIH
> **Method: Least Squares
> **Date: 08/12/11 Time: 12:44
> **Sample (adjusted): 1970Q2 2010Q2
> **Included observations: 161 after adjustments
> **Convergence achieved after 14 iterations
> **MA Backcast: 1969Q4 1970Q1
> **
> **Variable Coefficient Std.
2004 Oct 16
3
Cox PH Warning Message
Hi,
Can anybody tell me what the message below means and how to overcome it.
Thanks,
Neil
Warning message:
X matrix deemed to be singular; variable 2 in: coxph(Surv(age_at_death,
death) ~ project$pluralgp + project$yrborn + .........
>
2011 Oct 17
2
how to use 'which' inside of 'apply'?
Hello R-community,
I am trying to populate a column (doy) in a large dataset with the first
column number that exceeds the value in another column (thold) using the
'apply' function.
Sample data:
pt D1 D17 D33 D49 D65 D81 D97 D113 D129 D145 D161 D177
D193 D209 D225 D241 D257
1 39177 0 0 0 0 0 0 0 0 0.4336 0.4754 0.5340667 0.5927334
0.6514 0.6966
2006 Jun 13
1
plotting gaussian data
Ok I guess it's time to ask.
So I want to plot my data. It's my data from a frequency table, "temp". My
formula is just a Gaussian eq. I have done the nls function to get my
parameters and now I want to do the whole plot (...) and then lines(..)
This is what I have done.
> temp
bin x
1 -4.0 0
2 -3.9 0
3 -3.8 0
4 -3.7 0
5 -3.6 0
6 -3.5 0 .... and so
2004 Apr 05
1
fligner.test (ctest) (PR#6739)
Full_Name: Karel Zvara
Version: 1.8.1
OS: MS Winows 2000
Submission from: (NULL) (195.113.30.163)
The test statistics of the fligner.test (ctest package) depends on the order of
cases:
> fligner.test(count~spray,data=InsectSprays)
Fligner-Killeen test for homogeneity of variances
data: count by spray
Fligner-Killeen:med chi-squared = 14.4828, df = 5, p-value =
0.01282
>
2005 Mar 31
1
Contingency table: logistic regression
Hi,
I am analyzing a data set with greater than 1000 independent cases
(collected in an unrestricted manner), where each case has 3 variables
associated with it: one, a factor variable with 0/1 levels (called XX),
another factor variable with 8 levels (X) and a third response variable
with two levels (Y: 0/1). I am trying to see if X1 has an effect on the
relationship between X2 and the
2004 Sep 30
1
polr (MASS) and lrm (Design) differences in tests of statistical signifcance
Greetings:
I'm running R-1.9.1 on Fedora Core 2 Linux.
I tested a proportional odds logistic regression with MASS's polr and
Design's lrm. Parameter estimates between the 2 are consistent, but the
standard errors are quite different, and the conclusions from the t and
Wald tests are dramatically different. I cranked the "abstol" argument
up quite a bit in the polr
2005 Jan 27
3
weighting in nls
I'm fitting nonlinear functions to some growth data but I'm getting radically different results in R to another program (Prism). Furthermore the values from the other program give a better fit and seem more realistic. I think there is a problem with the results from the r nls function. The differences only occur with weighted data so I think I'm making a mistake in the weighting.
2008 May 14
1
rlm and lmrob error messages
Hello all,
I'm using R2.7.0 (on Windows 2000) and I'm trying do run a robust
regression on following model structure:
model = "Y ~ x1*x2 / (x3 + x4 + x5 +x6)"
where x1 and x2 are both factors (either 1 or 0) and x3.....x6 are numeric.
The error code I get when running rlm(as.formula(model), data=daymean) is:
error in rlm.default(x, y, weights, method = method, wt.method =
2001 Sep 18
1
case weights in coxph (survival)
Hi,
I am having trouble with the survival library, particualrily the coxph
function.
the following works
coxph(jtree9$cph.call,z,rep(1,dim(z)[1]))
Call:
coxph(formula = jtree9$cph.call, data = z, weights = rep(1, dim(z)[1]))
coef exp(coef) se(coef) z p
SM 0.2574 1.294 0.0786 3.274 1.1e-03
Sex -0.1283 0.880 0.1809 -0.709
2017 Sep 18
1
Confusing lstat() performance
On 18/09/17 17:23, Ben Turner wrote:
> Do you want tuned or untuned? If tuned I'd like to try one of my tunings for metadata, but I will use yours if you want.
(Re-CC'd list)
I would be interested in both, if possible: To confirm that it's not
only my machines that exhibit this behaviour given my settings, and to
see what can be achieved with your tuned settings.
Thank you!
2012 Jun 06
5
how to add a vertical line for each panel in a lattice dotplot with log scale?
by considering this example from barley dataset
#code start
dotplot(variety ~ yield | site, data = barley,
scales=list(x=list(log=TRUE)),
layout = c(1,6),
panel = function(...) {
panel.dotplot(...)
#median.values <- tapply(x, y, median) # medians for each
variety
#panel.abline(v=median.values, col.line="red") # but this
2008 Feb 06
1
Nested ANOVA models in R
Hi,
I'm trying to work through a Nested ANOVA for the following scenario:
20 males were used to fertilize eggs of 4 females per male, so that
female is nested within male (80 females used total). Spine length
was measured on 11 offspring per family, resulting in 880
measurements on 80 families.
I used the following two commands:
summary(aov(Spinelength ~ Male*Female))
and