Displaying 20 results from an estimated 600 matches similar to: "Comparing switchpoints from segmented"
2007 Oct 13
2
How to identify the two largest peaks in a trimodal distribution
Hello all
I'm trying to do a simulation that involves identifying the minimum
point between two peaks of a (usually) bimodal distribution. I can do
this easily if there are only two peaks:
CnBdens<-density(Ys/Xs) #probability density function for ratio of Ys
to Xs
for(p in 1:512) ifelse(CnBdens$y[p]>CnBdens$y[p-1],peak1<-p,break)
#identifies first peak in probability
2006 Aug 02
0
Trying to use segmented in a function
Hi folks
I wonder if anyone can help me. I want to run some simulations to see
how big a sample size might be necessary to distinguish a curved
bivariate relationship (e.g. something that might be best described
by a quadratic model) from a relationship that is two straight lines
with a sudden change in slope (e.g. something best described by a
breakpoint regression). I am using
2009 May 13
1
Block factor as random or fixed effect?
People
I apologise for asking a general stats question, but I'm at a bit of a
loss as to what to do following some hostile referees' comments. If I
have a fully randomised blocked design, with only three blocks, should
I treat block as a random or fixed effect? I have read comments about
not treating block as a random effect if the number of blocks is less
than 6 or 7: is this
2004 Mar 17
1
ANCOVA when you don't know factor levels
Hello people
I am doing some thinking about how to analyse data on dimorphic animals
- where different individuals of the same species have rather different
morphology. An example of this is that some male beetles have large
horns and small wings, and rely on beating the other guys up to get
access to mates, whereas others have smaller horns and larger wings,
and rely on mobility to
2004 Jul 22
2
exporting high quality graphics from R in Mac OSX
Hi there
The default option for saving graphics from R (1.9.1) on my Mac is as a
pdf file. If I open the file in Acrobat reader it looks really good and
crisp, and is obviously saved as vector graphics, since I can zoom in
as much as I like and it continues to look really nice. If I import it
into MS Word (from office 2000), or Textedit, however, it imports it as
a bitmap and unless I save
2003 Dec 02
1
changing axis font size in a pairs plot?
Hello
Can anyone let me know how I might change the size of the numbers on the
axes in a pairs plot? The normal cex.axis call doesn't do anything,
cex.labels only seems to change the font size in the diagonal labels. Using
R 1.8.0 on a Mac with OS X.3.
Thanks
Rob Knell
2005 Jan 10
1
Partial wireframe plots
Dear R-helpers
Can anyone direct me to a method for plotting what you might call a
partial wireframe plot? I have two explanatory variables in a dataset
which give me a significant interaction term when I fit a model. The
two variables are correlated with each other to a moderate degree, and
if I plot the predicted values from the model as a surface in a 3D
wireframe plot there are some
2004 May 18
1
mixed models
Hi folks
Can anyone direct me to a guide to analysing mixed models in R that is
understandable by mere mortals (or worse, mere biologists)? I have read
MASS and also Mick Crawley's book on the subject, have thrashed my way
through the various help files from the NLME package and I'm afraid I
remain baffled :-(. Particularly confusing is exactly what groupedData
does, how I should use
2005 Jun 17
0
net ads join fails on W2K3 server with latest MS patches
Hi All,
For the past few months I've been running a SUSE 9.2 server here
(mostly as an app server) which was a member of an AD domain
(w2k3 domain controller.) I used winbind to enable domain members
to log into the box, all was well.
This week the w2k3 server had some MS security patches applied
and suddenly logins became impossible, because winbind was unable
to retrieve user info from the
2004 Nov 22
6
Dynamic Failover
I am faced with a network that needs to autoswitch to isdn should
T-1 go down. After a shorewall search it looks to be quite a deal with
routing
config with linux. Like scripts written to deal with knowing the T-1 is
down.
I looked into a cisco router that does this. around $3000
This network has used shorewall as the gateway for 4 years now.
Currently Fedora as op. system. It appears to me
2009 Jan 26
1
Error in segmented() output from segmented package
Hi-
I'm gettting the following error message when trying to use the segmented
function to look for breakpoints in my data.
Error in segmented.glm(glm, seg.Z = ~segmentdist, psi = 2, control =
seg.control(display = F), :
(Some) estimated psi out of its range
Here are some real data and the models I'm calling which gives the error
above.
> segmentdist
[1] 0.000000 8.547576
2007 Oct 30
2
Where can I find package "segmented" ?
I tried to install "segmented" from three different repositories but I keep
getting the following message on R window: ... Please, advice where to find
this package.
Thank you in advance.
Maura
> utils:::menuInstallPkgs()
--- Please select a CRAN mirror for use in this session ---
Warning: package 'segmented' is in use and will not be installed
> utils:::menuInstallPkgs()
2012 Jan 10
1
Problem with segmented
Hi everyone.
I'm trying to use the segmented function with the following data:
For instance, I use segmented package as follow:
myreg2 = lm(xy$y ~ xy$x)
mysegmented = segmented(myreg2, seg.Z=~x, psi=c(245000), control =
seg.control(display=FALSE))
Which get me to the following error :
As a break point, a starting guess of 245000 seems fair.
Anyone has an idea why I'm getting such
2012 Mar 01
2
Help with segmented package
Hi everyone.
I'm using segmented package to find break point in a bi-linear relationship.
In a particular case, I find 1 pointcut (so 2 slopes).
I would like to know if it is possible to retrieve information in the
segmented object that could let me to plot 1 particular segment with a
different color.
For example, in that folowing example, I would like to plot the second
segment in red.
2012 Aug 05
1
Problem with segmented function
Hi,
I appreciate your help with the segmented function. I am relatively new to
R. I followed the introduction of the 'segmented'-package by Vito Muggeo,
but still it does not work.
Here are the lines I wrote:
data_test<-data.frame(x=c(1:10),y=c(1,1,1,1,1,2,3,4,5,6))
lr_test<-lm(y~x,data_test)
seg_test<-segmented(lr_test,seg.Z~x,psi=1)
/error in segmented.lm(lr_test, seg.Z ~ x,
2007 Oct 30
1
R segmented package
Most of the data sets I'm dealing with exhibit a time trend.
We would like to get rid of the time trend.
The plot shows in some cases a monotonic increase of the dependent variable
with time. This is the easiest case.
In some other cases the plot shows a time trend where the dependent variable
changes slope 4-5 times along the observations measurement period.
I've attempted a segmented
2003 Feb 24
2
segmented regression
Hello all,
I'm trying to find out how to perform a 'segmented regression'. I have some data and the 'classical' model used is:
y(t) = a + bx(t) + cx(t)^2 + u(t) for x(t) < x(0)
y(t) = a + bx(0) + cx(0)^2 + d(x(t) - x(0)) + u(t) for x(t) > x(0)
and u(t) = rho.u(t-1) + eps
(It's a model using an ARIMA-model, in this case AR(1)-process)
The parameters to estimate here
2013 Mar 12
1
Constrain slope in segmented package
Hello,
I'm currently using the segmented package of M.R. Muggeo to fit a
two-slope segmented regression. I would like to constrain a
null-left-slope, but I cannot make it. I followed the explanations of
the package (http://dssm.unipa.it/vmuggeo/segmentedRnews.pdf) to write
the following code :
fit.glm <- glm(y~x)
fit.seg <- segmented(fit.glm, seg.Z=~x,psi=0.3)
fit.glm
2006 Jan 18
1
Breakpoints for multiple variables using Segmented
Hi all,
I am using the package ?Segmented? to estimate logistic regression models
with unknown breakpoints (see Muggeo 2003 Statistics in Medicine
22:3055-3071). In the documentation it suggests that it might be possible to
include several variables with breakpoints in the same model: ?Z = a vector
or a matrix meaning the (continuous) explanatory variable(s) having
segmented relationships with
2012 Sep 28
1
Annotate a segmented linear regression plot
Hello,
I have produced some segmented regressions with the segmented package by
Viggo Mutteo. I have some example data and code below. I want to annotate
the individual segments with the slope parameter (actually it would be
nicer to annotate with 1000*slope and add some small amount of text as
well). How can I do it? Reading the docs for segmented I can access all of
the slope parameters via a