Displaying 20 results from an estimated 6000 matches similar to: "standard error for lda()"
2004 Jan 23
1
predict.lda problem with posterior probabilities
With predict.lda the posterior probabilities only relate to the existing
Class definitions. This is fine for Class definitions like gender but it is
a problem when new data does not necessarily belong to an existing Class.
Is there a classification method that gives posterior probabilities for
Class membership and does not assume the new data must belong to one of the
existing Classes? A new
2005 Jun 15
1
2 LDA
Hi,
I am using Partek for LDA analysis. For a binary
response variable, it generates 2 discriminant
functions, one for each of the 2 levels of the
response variable. And I can simply calculate 2
discriminant scores (say d1 and d2) for each sampples
using the 2 discriminant functions, then I can use the
following formula to compute the posterior probability
for the sample:
2004 Jul 13
1
lda() - again.
Hi.
I asked a question about lda() and got some answers. However, one
question remains (which is not independent of the earlier ones):
What output does lda() produce which I can use to compute the
posteriors? I know predict(lda())$posterior will give me precisely the
posteriors, but suppose I'd like to compute them myself, outside
of R.
So far, I have not been able to use
2003 Apr 02
1
lda of MASS library
Hi,
it seems that the lda function in MASS library doesn''t give out the constant for the linear discriminant function under the situation that we don''t use standardized variable, anyone knows how to obtain the constant in order to construct the linear discriminant function?
I understand that if the priors are set to be 1/2, the threshold of the discriminant score used to
2009 Aug 05
1
binning results
Hello,
I asked this as part of a previous message, but never really figured out
a usable solution. So this is a second attempt.
I have an process containing an SVM. The end result is the probability
that the class is true. That result is added back to the original data.
So I wind up with a data.frame that looks like this
label,v1,v2,v3,prob_true
What I want to do is measure how accurate
2010 Jul 18
2
loop troubles
Hi all, I appreciate the help this list has given me before. I have a
question which has been perplexing me. I have been working on doing a
Bayesian calculating inserting studies sequentially after using a
non-informative prior to get a meta-analysis type result. I created a
function using three iterations of this, my code is below. I insert prior
mean and precision (I add precision manually
2016 Sep 13
1
R-intro: function 'stderr' and 'sd'
While you are editing that, you might change its name from 'stderr'
to standardError (or standard_error, etc.) so as not to conflict with
base::stderr().
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, Sep 13, 2016 at 8:55 AM, Martin Maechler <maechler at stat.math.ethz.ch
> wrote:
> >>>>> Suharto Anggono Suharto Anggono via R-devel <r-devel at
2017 Jan 27
4
Suggestion: barplot function
Hello developers folks!
First, congratulations for the wonderful work with R.
For science, barplots with error bars are very important. We were
wondering that is so easy to use the boxplot function:
boxplot(Spores~treatment, col=treatment_colors)
But there is no such function for barplots with standard deviation or
standard error. It becomes a "journey" to plot a simple graph (e.g.
2012 Aug 05
1
Possible bug with MCMCpack metropolis sampler
Hi,
I'm having issues with what I believe is a bug in the MCMCpack's
MCMCmetrop1R function. I have code that basically looks like this:
posterior.sampler <- function(data, prior.mu){
log.posterior <- function(theta) log.likelihood(data, theta) +
log.prior(prior.mu, theta)
post.samples <- MCMCmetrop1R(log.posterior, theta.init=prior.mu,
burnin=100, mcmc=1000, thin=40,
2005 Dec 22
2
bVar slot of lmer objects and standard errors
Hello,
I am looking for a way to obtain standard errors for emprirical Bayes estimates of a model fitted with lmer (like the ones plotted on page 14 of the document available at http://www.eric.ed.gov/ERICDocs/data/ericdocs2/content_storage_01/0000000b/80/2b/b3/94.pdf). Harold Doran mentioned (http://tolstoy.newcastle.edu.au/~rking/R/help/05/08/10638.html) that the posterior modes' variances
2004 Sep 21
1
lda predict
Dear R-helpers,
I have a model created by lda, and I would like to use this
model to make predictions for new or old data. The catch is, I want to
do this without using the "predict" function, i.e. only using
information directly from the foo.lda object to create my posterior
probabilities. In anticipation of likely responses, I will be brushing
up my lda knowledge using the
2007 Apr 03
1
Calculating DIC from MCMC output
Greetings all,
I'm a newcomer to Bayesian stats, and I'm trying to calculate the
Deviance Information Criterion "by hand" from some MCMC output.
However, having consulted several sources, I am left confused as to
the exact terms to use. The most common formula can be written as
DIC = 2*Mean(Deviance over the whole sampled posterior distribution)
- Deviance(Mean
2007 Jan 26
1
Bayesian inference: Poisson distribution with normal (!) prior
Hello,
for a frequency modelling problem I want to combine expert knowledge with
incoming real-life data (which is not available up to now). The frequency
has to be modelled with a poisson distribution. The parameter lambda has to
be normal distributed (for certain reasons we did not NOT choose gamma
althoug it would make everything easier).
I've started with the subsequent two functions to
2012 Dec 18
1
multi dimensional optim problem
I am attempting to use optim to solve a neural network problem. I would like to optimize coefficients that are currently stored in a matrix
Y=270 x 1
X= 27- x 14
b1= 10x14
b2= 11x1
V= 10 x 14 set of prior variances.
I have the following function:
posterior.mode1=function(y,X,b_0,b2,V) {
log.like=function(b1) {
a_g=compute(b1)
z_g=tanh(a_g);
z_g=cbind(1,z_g)
2010 Sep 30
1
Accessing Vector of A Data Frame
I have a variable that looks like this:
> print(pred$posterior)
o x
1 2.356964e-03 9.976430e-01
2 8.988153e-01 1.011847e-01
3 9.466137e-01 5.338627e-02
4 2.731429e-11 1.000000e+00
Now what I want to do is to access "o" and "x"
How come this approach fail?
> print(pred$posterior$o)
or
>
2006 Dec 05
3
Comparing posterior and likelihood estimates for proportions (off topic)
This question is slightly off topic, but I'll use R to try and make it
as relevant as possible. I'm working on a problem where I want to
compare estimates from a posterior distribution with a uniform prior
with those obtained from a frequentist approach. Under these conditions
the estimates should agree.
Specifically, I am asking the question, "What is the probability that
the true
2006 Apr 12
3
[Q] Bayeisan Network with the "deal" package
Dear R-users
I am looking for a help in using the "deal" package.
I followed the manual and paper from the author's web site to learn it, as
shown below, but I could not figure out how to access the local and
posterior probability of the nodes in the constructed network.
library(deal)
data(ksl)
ksl.nw <- network(ksl)
ksl.prior <- jointprior(ksl.nw)
banlist <-
2011 Dec 03
2
density function always evaluating to zero
Dear R users,
I'm trying to carry out monte carlo integration of a posterior density
function which is the product of a normal and a gamma distribution. The
problem I have is that the density function always returns 0. How can I
solve this problem?
Here is my code
#generate data
x1 <- runif(100, min = -10, max = 10)
y <- 2 * x1^2 + rnorm(100)
# # # # # # # # Model 0 # # # # # # #
2008 Mar 14
0
Equation for the standard error of a predicted score for a cross-classified model
All,
I have several years of longitudinal test scores for students (many who
switch schools at various points in time). I am using a mixed-effects model
with crossed random effects to model student trajectories. The model
includes time at level 1 and students crossed with schools at level 2. When
I run the model I get the posterior variances on the intercepts and slopes
for students and schools,
2010 Aug 09
1
creating pdf of wireframe
Dear R list,
I have written some code to produce several wireframe plots in a panel. They
look good, but when I try to create a pdf, many (but not all) of the details
I have specified are not reproduced. For example, the line width I have
specified is not reproduced, and neither are the font sizes for the axis
labels. I'm an R novice, so I could really use some guidance.
Here is the code I am