Displaying 17 results from an estimated 17 matches for "mu_i".
Did you mean:
mu_
2018 Apr 12
3
Bivariate Normal Distribution Plots
R-Help
I am attempting to create a series of bivariate normal distributions. So using the mvtnorm library I have created the following code ...
# Standard deviations and correlation
sig_x <- 1
sig_y <- 1
rho_xy <- 0.0
# Covariance between X and Y
sig_xy <- rho_xy * sig_x *sig_y
# Covariance matrix
Sigma_xy <- matrix(c(sig_x ^ 2, sig_xy, sig_xy, sig_y ^ 2), nrow = 2, ncol = 2)
2011 Dec 13
1
Should I use nls for this?
Hi,
I have a dataset with the following properties:
Y_i ~ N(mu_i, theta * (mu_i)^2)
ln(mu_i) = B'Xi
theta and beta's are the parameters here.
I want to come up with a model to fit the data with the above property and
test that model on the built in R dataset quine.
Does nls() make sense in this case? Or is there any existing R package which
can f...
2023 Nov 08
1
Problem in R code
Good afternoon,
I have been working on my thesis project on the topic "Urban Heat Island
Pattern in India". To achieve the results I am applying a* two-dimensional
Gaussian fit* on an LST raster of 1 km spatial resolution but I am facing
two errors in the following code.
library(raster)
LST <- raster("D:/Celsius_Day/MOD_01.tif")
gaussian2d <- function(x, y, mu_x, mu_y,
2004 Feb 02
1
glm.poisson.disp versus glm.nb
...for TNBI and T_a. This made me happy. Now I
thought to try the ML estimates from glm.nb to see if the results would be
the same but I am having difficulty relating the dispersion phi from
glm.poisson.disp to theta estimated by glm.nb.
According to the R help for glm.poisson.disp " Var(y_i) = mu_i(1+mu_i*phi)
". The help for glm.nb lead me to a book by V&R (1994) which indicates that
Var(y)=mu+mu^2/theta. From this I gathered that phi=1/theta but the
estimates do not relate to each other in this way unless one is in error. In
a document by L.P. Ammann he says a "negative binomi...
2012 Mar 27
2
Supperscript, subscript and double lines in the main/sub title and using greek letters
...ow which one I can use...
When editing the title in R plots, such as using 'plot', or 'xyplot' in
'lattic', what method do you use to write greek letters and make use of
superscript and subscript, e.g. to write mathematical expressions like
using Latex:
\sigma^2
\tau^{2s}
\mu_i
\pi_{2s}
Also I would like to learn how to make two lines in the main title or sub
title if the text I need it too long for putting in a single line, e.g. are
there some R code/syntax allowing me to do something like in Latex to make
two lines in the title, for example using '//' or '\...
2007 Mar 09
1
help with zicounts
...)=x_{i}*gamma
with gamma=1.
beta.true<-1.0
gamma.true<-1.0
n<-1000
x<-matrix(rnorm(n),n,1)
pi<-expit(x*beta.true)
mu<-exp(x*gamma.true)
y<-numeric(n) # blank vector
z<-(runif(n)<pi) # logical: T with prob p_i, F otherwise
y[z]<-rpois(sum(z),mu[z]) # draw y_i ~ Poisson(mu_i) where z_i = T
y[!z]<-0 # set y_i = 0 where z_i = F
Thanks for your time!
Jacob
Jacob L van Wyk
Department of Statistics
University of Johannesburg, APK
P O Box 524
Auckland Park 2006
South Africa
Tel: +27 11 489 3080
Fax: +27 11 489 2832
2010 Aug 02
2
Dealing with a lot of parameters in a function
Hi all,
I'm trying to define and log-likelihood function to work with MLE.
There will be parameters like mu_i, sigma_i, tau_i, ro_i, for i between
1 to 24. Instead of listing all the parameters, one by one in the
function definition, is there a neat way to do it in R ? The example is
as follows:
ll<- function(mu1=-0.5,b=1.2,tau_1=0.5,sigma_1=0.5,ro_1=0.7)
{ if (tau1>0 && ro<1 &&...
2001 Oct 17
3
Type III sums of squares.
...her
soul as to whether the hypothesis which is being tested
is of any actual interest.
This would go much further toward bringing the desciple to true
enlightenment.
Point 3 --- what hypothesis is being tested by SSA?
Let factor A correspond to index i, and B to index j.
Let the cell means be mu_ij. (In the overparameterized
notation, mu_ij = mu + alpha_i + beta_j + gamma_ij.)
The hypothesis being tested is
H_0: mu_1.-bar = mu_2.-bar = ... = mu_a.-bar
where factor A has a levels, and ``mu_i.-bar'' means
the average (arithmetic mean) of mu_i1, mu_i2, ..., mu_ib.
(Note --- factor...
2017 Aug 10
1
"Help On optim"
...w in the above data frame represent the segment and each segment
contain two-mixture component. (Latter I will increase the segment and the
mixture component)
So for every segment with n mixture component I have to find the
*max f(x) with ?infinity < x < infinity*
*f(x)=sum_i c_i N(O,mu_i,sigma_i). *
*Since i need to calculate the derivate f? and set f?(x)=0 I thought of
using Newton method *
*In R the function I selected for my problem is optim.*
*Below is my code *
*l = 2 # represent the number of mixture component*
*i=1# represent the segment 1 if i=2 represent...
2008 Jul 28
1
Mixed model question.
...0.08461 9.90
tstnum5 0.47083 0.08461 5.56
tstnum6 0.97500 0.08461 11.52
The mean of (the columns of) the data matrix is
3.229167 3.695833 3.729167 4.066667 3.700000 4.204167
which is in exact agreement with the lmer() results when converted to
the same parameterization (mu_i = mu + alpha_i, with alpha_1 = 0).
(Notice the surprizing, depressing, and so far unexplained *drop*
in the response over the second summer.)
What I *don't* understand is the correlation structure of the estimates
produced by lmer(), which is:
Correlation of Fixed Effects:
(Intr) ts...
2007 Jul 19
1
R
Hello!
I am using for logistic regression in survey data the svyglm procedure.
I wondered how does the strata effect estimates SE (in addition to the
weights given proportional to population size).
I know that for simple regression measurements of each strata is assumed to
have different variance.
But in a logistic model this is not the case.
Can anyone help me here?
Thank you
Ron
[[alternative
2008 May 13
1
Likelihood between observed and predicted response
Hi,
I've two fitted models, one binomial model with presence-absence data
that predicts probability of presence and one gaussian model (normal or
log-normal abundances).
I would like to evaluate these models not on their capability of
adjustment but on their capability of prediction by calculating the
(log)likelihood between predicted and observed values for each type of
model.
I found
2008 Sep 22
1
Likelihood between observed and predicted response
...is the observed values (0 or 1).
>
> 1) Is anybody can tell me if this formula is statistically true?
This looks correct.
> 2) Can someone tell me what is the formula of the likelihood between
> observed and predicted values for a gaussian model ?
>
-2 L = sum( (x_i - mu_i)^2)/sigma^2 - 2*n*log(sigma) + C
assuming independence and equal variances:
but don't trust my algebra, see ?dnorm and take the log of the
likelihood shown there for yourself.
You're reinventing the wheel a bit here:
-2*sum(dbinom(y,prob=phat,size=1,log=TRUE))
and
-2*sum(dnorm(x,mean=mu...
2020 Oct 09
1
eps parameer in equiv.test
I am trying to understand the meaning of the eps parameter of the equiv.test parameter of the equiv.test function (package equivUMP)
The help file for equiv.test states that the parameter eps is "a single strictly positive number giving the equivalence limits"
What is the scale of measurement of eps? It does not appear to be the same scale as the scale used for the two vectors that are
2002 May 16
1
glm(y ~ -1 + c, "binomial") question
This is a question about removing the intercept in a binomial
glm() model with categorical predictors. V&R (3rd Ed. Ch7) and
Chambers & Hastie (1993) were very helpful but I wasn't sure I
got all the answers.
In a simplistic example suppose I want to explore how disability
(3 levels, profound, severe, and mild) affects the dichotomized
outcome. The glm1 model (see below) is
2001 Oct 10
2
Pearson residuals (PR#1123)
Full_Name: Carmen Fernandez
Version: 1.3.1
OS:
Submission from: (NULL) (138.251.202.115)
I think there is a problem when computing Pearson residuals, in that they seem
to be computed at the raw residuals divided by the square root of the
corresponding diagonal element of the weight matrix W evaluated at the last step
of the iterative model fitting procedure (IWLS), instead of dividing by the
2008 Jun 30
4
Rebuild of kernel 2.6.9-67.0.20.EL failure
Hello list.
I'm trying to rebuild the 2.6.9.67.0.20.EL kernel, but it fails even without
modifications.
How did I try it?
Created a (non-root) build environment (not a mock )
Installed the kernel.scr.rpm and did a
rpmbuild -ba --target=`uname -m` kernel-2.6.spec 2> prep-err.log | tee
prep-out.log
The build failed at the end:
Processing files: kernel-xenU-devel-2.6.9-67.0.20.EL
Checking