Displaying 20 results from an estimated 5000 matches similar to: "Derivative of the probit"
2010 Jul 20
1
question about sign of probit estimates
Hello,
I am getting some results from my Probit estimation in R that are in the
opposite direction of what I hypothesized. In sas, the default is
probability that y=0 (instead of 1) so one needs to type the word
"descending" to get P(y=1). Is the same true for R? Is the default set to
P(0)?
Thank you in advance.
Nita Umashankar
[[alternative HTML version deleted]]
2005 Dec 10
2
Problems with integrate
Hi,
Having a weird problem with the integrate function.
I have a function which calculates a loss density: I'd like to integrate
it to get the distribution.
The loss density function is:
lossdensity<-function(p,Beta,R=0.4){
# the second derivative of the PDF
# p is the default probability of the pool at which we are evaluating
the lossdensity
# Beta is the correlation with the market
2011 Dec 01
1
Estimation of AR(1) Model with Markov Switching
Dear R users,
I have been trying to obtain the MLE of the following model
state 0: y_t = 2 + 0.5 * y_{t-1} + e_t
state 1: y_t = 0.5 + 0.9 * y_{t-1} + e_t
where e_t ~ iidN(0,1)
transition probability between states is 0.2
I've generated some fake data and tried to estimate the parameters using the
constrOptim() function but I can't get sensible answers using it. I've tried
using
2010 Nov 12
4
dnorm and qnorm
Hello all,
I have a question about basic statistics. Given a PDF value of 0.328161,
how can I find out the value of -0.625 in R? It is like reversing the dnorm
function but I do not know how to do it in R.
> pdf.xb <- dnorm(-0.625)
> pdf.xb
[1] 0.328161
> qnorm(pdf.xb)
[1] -0.444997
> pnorm(pdf.xb)
[1] 0.628605
Many thanks,
Edwin
--
View this message in context:
2007 Jun 25
3
How to shadow 'power' area?
Dear all,
Suppose I plot two normal distributions (A and B) side by side and add
vertical line which hipotheticaly represent alpha value; e.g.:
x <- seq(-3.5,5, length=1000)
y <- dnorm(x)
# Plot distribution A
plot(y~x, type='l',axes=F,xlab="",ylab="",lwd=2)
# Plot distribution B
y2 <- dnorm(x-1.5)
lines(y2~x,lwd=2)
# Plot vertical line for alpha value
2008 Apr 03
1
help with R semantics
Greetings:
I'm running R2.6.2 on a WinXP DELL box with 2 gig RAM.
I have created a new glm link function to be used with family = binomial.
The function works (although any suggested improvements would be welcome),
logit.FC <- function(POD.floor = 0, POD.ceiling =1)
{ if (POD.floor < 0 | POD.floor > 1) stop ("POD.floor must be between zero
and one.")
if
2003 Mar 31
2
point-biserial correlation
Dear list,
has anyone written a package/function in R for computing a point-
biserial resp. biserial correlation?
Thanks in advance
Bernd
2011 May 30
1
Error in minimizing an integrand using optim
Hi,
Am not sure if my code itself is correct. Here's what am trying to do:
Minimize integration of a function of gaussian distributed variable 'x' over
the interval qnorm(0.999) to Inf by changing value of parameter 'mu'. mu is
the shift in mean of 'x'.
Code:
# x follows gaussian distribution
# fx2 to be minimized by changing values of mu
# integration to be done over
2010 May 16
1
predict.lda breaks when priors are specified
Dear R help,
What am I doing wrong here? when I don't specify the priors it works
just fine but when I specify the priors it breaks.? Does anyone know
why and how I can fix it?
----
> N=20000
> ncontrol=ncases=50
> X <- as.matrix(rnorm(N,0,1))
> eta <- -5.3 + X * 1.7
> p <- exp(eta)/(1+exp(eta))
> Y <- rbinom(N,1,p)
> controls <- sample(seq_len(N),
2006 Nov 19
1
problems with axis
hi list!
i'm plotting a probit plot .On x axis i have value of a statistical
variable. on y axis the corresponding normalized representation. I
have this code
plot(vals,perc,axes=F,col="red",pch=19,cex=0.25)
probit.scale.values <-
c(0,0.001,0.01,0.05,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.95,0.99,0.999,1)
probit.scale.at <- qnorm(probit.scale.values)
2009 Mar 10
6
Pseudo-random numbers between two numbers
I would like to generate pseudo-random numbers between two numbers using
R, up to a given distribution,
for instance, rnorm.
That is something like rnorm(HowMany,Min,Max,mean,sd) over
rnorm(HowMany,mean,sd).
I am wondering if
dnorm(runif(HowMany, Min, Max), mean, sd)
is good. Any idea? Thanks.
-james
2012 Jun 18
3
(1-1e-100)==1 true?
Hi,
This problems has bothered me for the lase couple of hours.
> 1e-100==0
[1] FALSE
> (1-1e-100)==1
[1] TRUE
How can I tell R that 1-1e-100 does not equal to 1, actually, I found out
that
> (1-1e-16)==1
[1] FALSE
> (1-1e-17)==1
[1] TRUE
The reason I care about this is that I was try to use qnorm() in my code,
for example,
> qnorm(1e-100)
[1] -21.27345
and if I want to
2002 Feb 01
4
ROC curves using R
I did some serach around. It seems that ROC curve computation is not
supported on R. Anyone has some leads? Thanks.
Jason
=====
Jason G. Liao, Ph.D.
Division of Biometrics
UMDNJ School of Public Health
335 George Street, Suite 2200
New Brunswick, NJ 08903-2688
phone (732) 235-9748, fax (732) 235-9777
http://www.geocities.com/jg_liao
__________________________________________________
Great
2012 Apr 07
1
Uniroot error
Dear All
I am trying to find a uniroot of a function within another function (see
example) but I am getting an error message (f()values at end points not of
opposite sign). I was wondering if you would be able to advise how redefine
my function so that I can find the solution. In short my first function
calculates the intergrale which is function of "t" , I need to find the
uniroot of
2000 Jan 12
1
Usage of p/d/qnorm
Hello,
could You please help: I am looking for a way to formulate test accuracy
measures such as test sensitivity, specificity, predictive values, and
correct classification rate using p/d/qnorm. The tests' primary values
follow a bimodal distribution, which is modelled by a mixture of two normal
distributions:
p * dnorm ((x - u1) / s1) / s1 +
(1 - p) * dnorm ((x - u2) / s2) / s2)
2007 Jul 27
1
R codes for g-and-h distribution
hi!
I would like to ask help how to generate numbers from g-and-h distribution. This distribution is like normal distribution but span more of the kurtosis and skewness plane. Has R any package on how to generate them?
Any help will be greatly appreciated. Thank you so much!
Form,
Filame Uyaco
---------------------------------
[[alternative HTML version deleted]]
2006 May 06
3
probit analysis
Dear all,
I have a very simple set of data and I would like to analyze them
with probit analysis.
dose event trial
0.0 3 15
1.1 4 15
1.3 4 15
2.0 3 15
2.2 5 15
2.8 4 15
3.7 5 15
3.9 9 15
4.4 8 15
4.8 11 15
5.9 12 15
6.8 13 15
The dose should be transformed with log10().
I use glm(y ~ log10(dose), family=binomial(link=probit)) to
do probit analysis, however, I have to exclude the
2001 Aug 31
2
Probit model
R users,
I got a problem to analyze with probit model. What package contains the algorithm to do probit model.
Lawrence N.M Kazembe
Mathematical Sciences Department
Chancellor College
University of Malawi
P.O. Box 280
Zomba
Malawi
Tel: (265) 524 222 ext 284
Fax: (265) 524 046
e-mail: lkazembe at chirunga.sdnp.org.mw
url: kazembe.cjb.net
kazembe.tsx.org
2003 Nov 06
1
for help about R--probit
Not real data. It was gererated randomly. The original codes are the following:
par(mfrow=c(2,1))
n <- 500
#########################
#DATA GENERATING PROCESS#
#########################
x1 <- rnorm(n,0,1)
x2 <- rchisq(n,df=3,ncp=0)-3
sigma <- 1
u1 <- rnorm(n,0,sigma)
ylatent1 <-x1+x2+u1
y1 <- (ylatent1 >=0) # create the binary indicator
#######################
#THE
2004 Dec 03
3
multinomial probit
Hello All,
I'm trying to run a multinomial probit on a dataset with 28 data
points and five levels (0,1,2,3,4) in the latent choice involving
response variable.
I downloaded the latest mnp package to run the regression. It starts
the calculation and then crashes the rpogram. I wish I could give the
error message but it literally shuts down R without a warning.
I'm using the R