Displaying 20 results from an estimated 300 matches similar to: "variance?,..."
2012 Jul 06
2
Mixed Models providing a correlation structure.
Hi folks,
I was wondering how to run a mixed models approach to analyze a linear
regression with a user-defined covariance structure.
I have my model
y = xa +zb +e and
b ~ N (0, C*sigma_square). (and a is a fixed effects)
I would like to provide R the C (variance-covariance) matrix
I can easily provide an example, but at this point I am first trying to know
what is the best package the
2011 Jul 25
1
Problem with random number simulation
Hi this is my first post. I am trying to run a simulation for a computer
playing Von Neumann poker and adjusting it's expectation of an opponent's
behavior according to how the opponent plays. This program involves random
generation of "hands" and shifting of parameters. However, when I run the
code, no errors come up, but the program doesn't do anything. Could someone
2000 Jan 10
1
'at' parameter in mtext(.., adj=0, outer=T) (PR#396)
Depending on the setting of par()$usr,
the 'at' setting in mtext(.., adj=0, outer=T) may cause the
text to appear in an anomalous position (e. g. in the first
instance below, at the left of the plot region rather than
at 'at=0' in the figure region), or the text may not appear
at all.
If one does not set the 'at' parameter the text appears
(with 'adj=0') on the
2013 Mar 22
1
Trouble embedding functions (e.g., deltaMethod) in other functions
Dear R community,
I've been writing simple functions for the past year and half and have come
across a similar problem several times. The execution of a function within
my own function produces NaN's or fails to execute as intended. My conundrum
is that I can execute the function outside of my function without error, so
it's difficult for me, as a novice functioneer, to figure out
2009 Sep 23
0
ROCR.plot methods, cross validation averaging
Dear R-help and ROCR developers (Tobias Sing and Oliver Sander) -
I think my first question is generic and could apply to many methods,
which is why I'm directing this initially to R-help as well as Tobias and Oliver.
Question 1. The plot function in ROCR will average your cross validation
data if asked. I'd like to use that averaged data to find a "best" cutoff
but I
2009 Jun 09
3
rpart - the xval argument in rpart.control and in xpred.rpart
Dear R users,
I'm working with the rpart package and want to evaluate the performance of
user defined split functions.
I have some problems in understanding the meaning of the xval argument in
the two functions rpart.control and xpred.rpart. In the former it is defined
as the number of cross-validations while in the latter it is defined as the
number of cross-validation groups. If I am
2013 Mar 31
0
Skewness of fitted mixture not correct?
I fitted a gaussian mixture to my financial data. The data can be found
here: http://uploadeasy.net/upload/32xzq.rar
I look at the density with
plot(density(dat),col="red",lwd=2)
this has a skew of
library(e1071)
skewness(dat)
-0.1284311
Now, I fit a gaussian mixture according to:
f(l)=πϕ(l;μ1,σ21)+(1−π)ϕ(l;μ2,σ22)
with:
2010 Mar 12
1
using xval in mvpart to specify cross validation groups
Dear R's
I'm trying to use specific rather than random cross-validation groups
in mvpart.
The man page says:
xval Number of cross-validations or vector defining cross-validation groups.
And I found this reply to the list by Terry Therneau from 2006
The rpart function allows one to give the cross-validation groups explicitly.
So if the number of observations was 10, you could use
2007 Mar 01
1
Generating R plots through Perl
Hello,
I am in the process of writing a Perl program to carry out and analyze
large numbers of regressions using R as the regression engine, and I am
using Statistics::R to create the communication bridge between the two
programs. Statistics::R creates a pipe between R and Perl and uses
Rterm.exe (hidden during run-time) to carry out the R commands. This
communication bridge works well for
2009 Sep 24
3
pipe data from plot(). was: ROCR.plot methods, cross validation averaging
All,
I'm trying again with a slightly more generic version of my first question. I can extract the
plotted values from hist(), boxplot(), and even plot.randomForest(). Observe:
# get some data
dat <- rnorm(100)
# grab histogram data
hdat <- hist(dat)
hdat #provides details of the hist output
#grab boxplot data
bdat <- boxplot(dat)
bdat #provides details of the boxplot
2009 Jul 25
4
ROCR package question
I use ROCR to plot multiple runs' performance. Using the sample code
as example:
# plot ROC curves for several cross-validation runs (dotted
# in grey), overlaid by the vertical average curve and boxplots
# showing the vertical spread around the average.
data(ROCR.xval)
pred <- prediction(ROCR.xval$predictions, ROCR.xval$labels)
perf <- performance(pred,"tpr","fpr")
2005 Apr 21
1
lda (MASS)
hi!
this is a question about lda (MASS) in R on a particular dataset.
I'm not a specialist about any of this but:
First with the well-known "iris" dataset, I tried using lda to discriminate
versicolor from the other to classes and I got approx. 70% of accuracy
testing on train set. In iris, versicolor stands "between" the 2 other so
one can expect lda not to perform well
2004 Sep 24
5
AW: How to improve the quality of curve/line plots?
Thanks for the tip using a smoothing technique before plotiing in order to get a curve instead of a line connecting the observations.
But that's not the solution for my main problem with the "unclean" line plot. In order to show my problem let's take this simple example:
> xval <- c(1, 2, 3, 4, 5, 6, 7, 8)
> yval <- c(10, 30, 40, 50, 70, 90, 100, 110)
> plot
2006 Feb 20
1
Further rgl()/spheres3d() query
Hi,
I am applying the following code to map pca loadings onto a 3d grid, my
problem is this - the output only plots the spheres in the requested color
(in this case "red") for the first argument. The sphere from the second
argument appear as flat dark circles. Also the text3d() command only seems
to work for a couple of the positions, with no text added in most cases.
Could anyone offer
2008 May 28
1
indexing lists, using brobdingnagian
Dear R-Gurus,
I have ended up with a calculation problem where I need to use brobs.
I have to work my way through a vector with a for loop to act on each
element in a calculation (refering to the previous
value in the new vector of results -- so as far as I know I can't use
"apply") -- this produces a list of brobs.
My problem is, how do I act on, plot this list, or do vector
2011 Feb 22
1
Transfer function observed vs predicted values graph problem
Hi,
I am trying to make a palaeoenvironmental transfer function using the R
package rioja that predicts the water-table (measured as depth to the water
table) of an area given the testate amoebae that are found there. I've
carried out weighted averaging of the data and am trying to produce a graph
that shows the observed water-table versues the model's predicted values.
Following the
2006 Aug 24
0
Classification tree with a random variable
Hi,
I am planning on using classification trees to build a predictive model for data which includes a random variable. I intend to use the R functions 'rpart' (and potentially also 'randomForest' and 'bagging').
I have a data set with 390 data points. The response variable is binary. There are a large number of variables (>20, both categorical and continuous). The
2012 Dec 07
0
loop for calculating 1-se in rpart
Hi Listers
I need to calculate and then plot a frequency histogram of the best tree
calculated using the 1-se rule. I have included some code that has worked
well for me in the past but it was only for selecting the minimum
cross-validation error. I include the code for my model, some relevant
output and the code for selecting and plotting the frequency histogram of
minimum xerror.
Here is the
2007 Dec 10
1
Multiple Reponse CART Analysis
Dear R friends-
I'm attempting to generate a regression tree with one gradient predictor and multiple responses, trying to test if change in size (turtle.data$Clength) acts as a single predictor of ten multiple diet taxa abundances (prey.data) Neither rpart or mvpart seem to allow me to do multiple responses. (Or if they can, I'm not using the functions properly.)
> library(rpart)
2011 Sep 13
1
mvpart analyses with covariables
Hi all,
I am fairly new to R and I am trying to run mvpart and create a MRT using
explanatory variables and covariables. I've been following the procedures in
Numerical Ecoogy with R.
The command (no covariables) which works fine -
ABUNDTMRT <- mvpart(abundance ~
.,factors,margin=0.08,cp=0,xv="1se",xval=nrow(abundance),xvmult=100,which=4)
where abundance is 4th root