Displaying 20 results from an estimated 500 matches similar to: "problem with 'integrate'"
2011 Jul 19
2
Incorrect degrees of freedom for splines using GAMM4?
Hello,
I'm running mixed models in GAMM4 with 2 (non-nested) random intercepts and
I want to include a spline term for one of my exposure variables. However,
when I include a spline term, I always get reported degrees of freedom of
less than 1, even when I know that my spline is using more than 1 degree of
freedom. For example, here is the code for my model:
>
2024 Jun 29
2
\>
Hi, Duncan:
On 6/29/24 17:24, Duncan Murdoch wrote:
>
>> ????? Yes. I'm not yet facile with "|>", but I'm learning.
>>
>>
>> ????? Spencer Graves
>
> There's very little to know.? This:
>
> ???? x |> f() |> g()
>
> is just a different way of writing
>
> ??? g(f(x))
>
> If f() or g() have extra
2006 Jul 03
1
gamm
Hello,
I am a bit confused about gamm in mgcv. Consulting Wood (2006) or Ruppert et al. (2003) hasn't taken away my confusion.
In this code from the gamm help file:
b2<-gamm(y~s(x0)+s(x1)+s(x2)+s(x3),family=poisson,random=list(fac=~1))
Am I correct in assuming that we have a random intercept here....but that the amount of smoothing is also changing per level of the
2012 May 03
1
conducting GAM-GEE within gamm4?
Dear R-help users,
I am trying to analyze some visual transect data of organisms to generate a
habitat distribution model. Once organisms are sighted, they are followed
as point data is collected at a given time interval. Because of the
autocorrelation among these "follows," I wish to utilize a GAM-GEE approach
similar to that of Pirotta et al. 2011, using packages 'yags' and
2012 Jul 27
2
How can I access an element of a string?
Dear Daniel and Jorge,
Thank you very much and it does help.
If I have a string "ABCD", how can I access the second element of the
string "B"? Thanks,
Miao
2012/7/27 Daniel Nordlund <djnordlund@frontier.com>
> > -----Original Message-----
> > From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org]
> > On Behalf Of jpm miao
2010 May 19
1
Displaying smooth bases - mgcv package
Dear all,
for demonstration purposes I want to display the basis functions used by a
thin plate regression spline in a gamm model. I've been searching the help
files, but I can't really figure out how to get the plots of the basis
functions. Anybody an idea?
Some toy code :
require(mgcv)
require(nlme)
x1 <- 1:1000
x2 <- runif(1000,10,500)
fx1 <- -4*sin(x1/50)
fx2 <-
2012 Jul 27
2
How can I access the title of a table read via read.csv?
Hi,
I have a table which I can read via read.csv:
fx1<-read.csv(file="A_FX_M.csv", header=TRUE)
TIME REER NTD JPY GBP HKD
1 198001 124.26 36.030 237.96 2.263980 4.8366
2 198002 126.59 36.030 244.05 2.290426 4.8765
3 198003 128.33 36.026 248.62 2.206045 4.9960
4 198004 127.85 36.063 251.67 2.215330 4.9760
5 198005 124.40 36.050 228.35 2.302026 4.8891
6 198006
2006 Jun 06
1
gamm error message
Hello,
Why would I get an error message with the following code for gamm? I
want to fit the a gam with different variances per stratum.
library(mgcv)
library(nlme)
Y<-rnorm(100)
X<-rnorm(100,sd=2)
Z<-rep(c(T,F),each=50)
test<-gamm(Y~s(X),weights=varIdent(form=~1|Z))
summary(test$lme) #ok
summary(test$gam)
Gives an error message:
Error in inherits(x, "data.frame")
2006 Jun 07
3
Building packages in R - 'private' functions
Hello.
I am creating an R package that I'd like to submit to CRAN (OS Windows
XP). How do I distinguish among 'public' functions, e.g., those that are
intended to be called by users of the package and for which I am providing
documentation & examples, and 'private' functions, which are used
internally by the 'public' functions, but for which I do not wish to
2006 Jun 13
2
Building R package: make pdf & _masked_by_GlobalEnv
Hi....
I am assembling an R package (under Windows XP, R v.2.3) and have a very
basic question. Running R CMD build does not generate a pdf. R CMD check
generates a .dvi, but I cannot figure out how to automatically create the
pdf. I thought from reading the "writing r extensions' manual that R CMD
build was supposed to generate the pdf. I am having no success using
various
2013 Jun 07
1
gamm in mgcv random effect significance
Dear R-helpers,
I'd like to understand how to test the statistical significance of a
random effect in gamm. I am using gamm because I want to test a model
with an AR(1) error structure, and it is my understanding neither gam
nor gamm4 will do the latter.
The data set includes nine short interrupted time series (single case
designs in education, sometimes called N-of-1 trials in medicine)
2006 Dec 05
1
dynamic variable creation in lists and data frames
Hi
I have a question about the creation of variables within lists in R. I am
running simulations and am interested in two parameters, ESM and ESMM (the
similarity of these names is important for my question). I do simulations
to generate ESMM, then plug these values into a second simulation function
to get ESM:
x <- list()
for (i in 1:nsimulations)
{
x$ESMM[i] <- do_simulation1()
2006 May 19
2
"Pipelining" programs in R
Hello...
I would like to use R for 'pipelining' data among several programs. I'm
wondering how I can use R to call another program, feed that program a set
of parameters, and retrieve the output.
E.g., I have an executable that, when opened, prompts the user to enter a
set of parameters. The program then executes & prompts the user for the
name of an output file. I need to
2002 Aug 10
0
?subexpressions, D, deriv
Hi all,
I am not used to using the computer to do calculus and have up to
now done my differentiation "by hand" , calling on skills I learned
many years ago and some standard cheat sheets.
My interest at present is in getting the second derivative of a
gaussian, which I did by hand and results in a somewhat messy
result involving terms in sigma^5 .. I have done some spot checks
2024 Jun 29
1
\>
> Yes. I'm not yet facile with "|>", but I'm learning.
>
>
> Spencer Graves
There's very little to know. This:
x |> f() |> g()
is just a different way of writing
g(f(x))
If f() or g() have extra arguments, just add them afterwards:
x |> f(a = 1) |> g(b = 2)
is just
g(f(x, a = 1), b = 2)
This isn't quite
2006 Feb 15
1
using kernel density estimates to infer mode of distribution
Hello...
Is it possible to use "density" or another kernel density estimator to
identify the mode of a distribution? When I use 'density', the resulting
density plot of my data is much cleaner than the original noisy histogram,
and I can clearly see the signal that I am interested in. E.g., suppose my
data is actually drawn from two or more normal (or other)
2002 Sep 23
0
arima() in package ts.
I've been trying to get comfy with arima() and associated functions
in the ts() package. I'm thinking seriously about using this
package, and R generally, in a 4th year intro time series course that
I'm teaching this autumn.
I have a couple of questions about arima:
(1) The help file says that residuals component of the value returned
by arima() consists of the
2012 Jul 19
3
write list to ascii
Dear all,
apologies for this (perhaps recurrent) question but I did not found a question when searching mailing lists.
How to write a list of a simple kind, e.g.:
abc <- list(one=(1:2), two=(1:5))
# to a file? I understand that write() & co. cannot work but when I try
sink("aa.txt", append=T, split=T)
abc
sink()
# the output is indeed "split by rows" in the
2004 Aug 06
0
toner cartridges
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="sam">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; I) [Netscape]">
<title>fgfg</title>
2002 Jul 12
1
toner cartridges
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="sam">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; I) [Netscape]">
<title>fgfg</title>