Displaying 20 results from an estimated 100 matches similar to: "Fit a 3-Dimensional Line to Data Points"
2011 Apr 07
1
dotplot as a background for multiple barchart plots (with Lattice)
Hi R users,
I'm kind stuck in my R experience...
I want to have a multiple barchart with n windows, but with the same
background for each window, and I want that background to be a recorded
dotplot.
First, is it possible ?
If so, I guess I have to call a record plot in the panel function but how ?
As there is no panel.plot and I can't use the recorded plot as an
argument for the
2005 Oct 05
1
(no subject)
hi all
why does the following not work???
this was someone elses code and i couldnt explain why it doesn't work.
m=matrix(c(0,0),2,1)
v=matrix(c(1,0,0,1),2,2)
Y=function(X1,X2,mu=m,V=v)
{
X=matrix(c(X1,X2),2,1)
a=(1/((2*pi)*sqrt(det(V))))*exp((-0.5)*(t(X-mu)%*%solve(V)%*%(X-mu)))
a[1]
}
x1=seq(-1,1)
x2=x1
Z=outer(x1,x2,FUN="Y",mu=m,V=v)
persp(x1,x2,Z)
my code:
2011 Aug 12
2
recode Variable in dependence of values of two other variables
Hi,
as an R-beginner, I have a recoding problem and hope you can help me:
I am working on a SPSS dataset, which I loaded into R (load("C:/...)
I have 2 existing Variables: "ID" and "X" ,
and one variable to be computed: meanX.dependID (=mean of X for all rows
in which ID has the same value)
ID = subject ID. Since it is a longitudinal dataset, there are repeated
2006 Apr 08
1
add lines to a plot with a loop without erase the last one
Hello,
I want to plot several lines to a main plot but at the end of each loop, it
erases the last one.
Here my program:
alpha<-5
beta<-10
var<-0.5
s<-runif(1000,0,50)
m<-length(s)
variancealpha<-0.002
variancebeta<-0.051
variancevar<-0.001
alphachap<-vector()
betachap<-vector()
varchap<-vector()
epsilon<-vector()
b<-vector()
2011 Aug 11
1
Splitting data
I want to implement the following algorithm in R:
I want to split my data, use a t test to compare both means of the groups to see if they significantly differ from each other. If this is a yes (p < alpha) I want to split again (into 4 groups) and do the same procedure twice, and stop otherwise (here the problem arises). As a final result I would have different groups of data.
I made some
2008 Jul 06
3
Lots of huge matrices, for-loops, speed
Hello,
we have 80 text files with matrices. Each matrix represents a map (rows for
latitude and columns for longitude), the 80 maps represent steps in time. In
addition, we have a vector x of length 80. We would like to compute a
regression between matrices (response through time) and x and create maps
representing coefficients, r2 etc. Problem: the 80 matrices are of the size
4000 x 3500 and we
2011 Nov 22
3
Binned line plot
I have a scatter plot with 10000 points.? I would like to add a line that bins every 50 points and connects the average of each bin.? I'm looking for something similar to line type "m" in Stata.
With this dataset of 10000 points, I would also like to bin the data and make boxplots at certain intervals, so that I have a set of boxplots to represent each bin.? I would also like the
2006 Oct 30
2
how to set debug breaks
Hi,
I am new in R and have some frustrations as how to set debug breaks during
emacs R debug. I use debug () as where or which function to debug. But
during the debug, e.g., I have a for loop at the beginning of the function
code and want the code execution to jump through that for loop and set a
break after that. How to do that? Is there a web site detailing the syntax
of the debugging of R?
2010 Aug 09
1
nested 'by'
Assuming a data frame or matrix with two columns representing variable that
you want to aggregate over.
you want to calculate column means, by year, for each Id
example<-data.frame(id=c(rep(12345,5),rep(54321,6),rep(45678,7)),Year=rep(seq(1900,1902,by=1),6),
x=seq(1,18,by=1),y=seq(18,1,by=-1))
example
id Year x y
1 12345 1900 1 18
2 12345 1901 2 17
3 12345 1902 3 16
4 12345
2010 Dec 08
1
the output of function lars
Hi here is the code as example
lars is in package lars
> x<-matrix(rnorm(20*5,0,1),20,5)
> bs<-matrix(sample(seq(1:10),5),5,1)
> er<-rnorm(20,0,1)
> y<-x%*%bs+er
> lobj<-lars(x,y,type="lasso")
> names(lobj)
[1] "call" "type" "df" "lambda" "R2"
[6] "RSS"
2010 Apr 06
1
Caret package and lasso
Dear all,
I have used following code but everytime I encounter a problem of not having
coefficients for all the variables in the predictor set.
# code
rm(list=ls())
library(caret)
# generating response and design matrix
X<-matrix(rnorm(50*100),nrow=50)
y<-rnorm(50*1)
# Applying caret package
con<-trainControl(method="cv",number=10)
data<-NULL
data<- train(X,y,
2017 Nov 19
2
pjsip subscribe (presence) always returns: No matching endpoint found
Hi Joshua
thank you for the quick reply
> Have you checked the Asterisk console when PJSIP is loaded to see if
> the endpoint did not load for some reason? Does it show up in "pjsip
> show endpoints"?
Yes, the endpoint shows up.
Endpoint: 11/(scrubbed from mail) Not in use 0 of inf
InAuth: 11/11
Aor: 11
2005 Jul 21
0
reorder bug in heatmap.2?
I want to plot a heatmap without reordering the columns. This works
fine in "heatmap":
> heatmap(meanX[selected,], col=cm.colors(256), Colv=NA)
But in "heatmap.2" I get:
> heatmap.2(meanX[selected,], col=cm.colors(256), Colv=NA)
Error in if (!is.logical(Colv) || Colv) ddc <- reorder(ddc, Colv) :
missing value where TRUE/FALSE needed
(Note that instructions for
2009 Feb 23
1
Follow-up to Reply: Overdispersion with binomial distribution
THANKS so very much for your help (previous and future!). I have a two
follow-up questions.
1) You say that dispersion = 1 by definition ....dispersion changes from 1
to 13.5 when I go from binomial to quasibinomial....does this suggest that
I should use the binomial? i.e., is the dispersion factor more important
that the
2) Is there a cutoff for too much overdispersion - mine seems to be
2005 Jun 29
1
poly() in lm() leads to wrong coefficients (but correct residuals)
Dear all,
I am using poly() in lm() in the following form.
1> DelsDPWOS.lm3 <- lm(DelsPDWOS[,1] ~ poly(DelsPDWOS[,4],3))
2> DelsDPWOS.I.lm3 <- lm(DelsPDWOS[,1] ~ poly(I(DelsPDWOS[,4]),3))
3> DelsDPWOS.2.lm3 <-
lm(DelsPDWOS[,1]~DelsPDWOS[,4]+I(DelsPDWOS[,4]^2)+I(DelsPDWOS[,4]^3))
1 and 2 lead to identical but wrong results. 3 is correct. Surprisingly
(to me) the residuals
2012 Aug 02
2
metafor- interpretation of moderators test for raw proportions
Hello metafor users,
I'm using metafor to perform a single-effect summary estimate of the raw
proportion of patients experiencing a post-operative complication, and I'm
interested in seeing if this proportion differs between the three most
commonly used surgical techniques. The software is working as expected, but
I would like to double check on the interpretation of my mixed-effect model
2023 Aug 09
2
Encountered a crash, what is best way to tell if it has been fixed or now
On Wed, Aug 9, 2023 at 3:20 PM Dan Cropp <dcropp at amtelco.com> wrote:
> I have a customer who just encountered a crash while running Asterisk
> 18.17.1 version.
>
>
>
> I’m trying to adapt to the changes so not sure where best to look or how
> to possibly report this.
>
>
>
> I started by going through
>
2009 Jul 21
0
Specifying initial values for arima.sim
Hi Everyone,
I'm having a problem with arima.sim. Namely specifying inital values
for the series.
If I generate a random walk
> vs = rnorm(100,0,1)
> xs = cumsum(vs)
and fit an ARIMA(1,0,0) to it
> xarima = arima(xs,order=c(1,0,0))
> xarima
Call:
arima(x = xs, order = c(1, 0, 0))
Coefficients:
ar1 intercept
0.9895 8.6341
s.e. 0.0106 6.1869
I should
2017 May 09
2
asterisk 13.15.0 stopping/crashing
hi,
i have strange problem with asterisk 13.15.0+pjsip bundled/centos
7/systemd start script
we are using chan_pjsip only for webrtc endpoints . switched from sipml5
to jssip with upgrade to 13.15.0(from 13.9.0) few days ago
today i have problems with stopping/crashing asterisk
/var/log/asterisk/messages dont show any clues
[May 9 12:10:52] WARNING[25762] pjproject: tsx0x7fbb28024088
2017 Dec 02
2
pjsip subscribe (presence) always returns: No matching endpoint found
Hi Joshua
> The chan_pjsip module doesn't prevent that. You'd need to provide the
> full SUBSCRIBE now that it is actually finding the endpoint and coming
> in.
Ok, let's see if we can solve the mystery..
pjsip.conf
[endpt-home](!)
type=endpoint
disallow=all
allow=g722
allow=alaw
allow=gsm
ice_support=yes
context=from-home
allow_subscribe=yes