Displaying 17 results from an estimated 17 matches for "mu_y".
Did you mean:
ms_y
2018 Apr 12
3
Bivariate Normal Distribution Plots
...lation
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)
# Load the mvtnorm package
library("mvtnorm")
# Means
mu_x <- 0
mu_y <- 0
# Simulate 1000 observations
set.seed(12345) # for reproducibility
xy_vals <- rmvnorm(1000, mean = c(mu_x, mu_y), sigma = Sigma_xy)
# Have a look at the first observations
head(xy_vals)
# Create scatterplot
plot(xy_vals[, 1], xy_vals[, 2], pch = 16, cex = 2, col = "blue",...
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 fit this model?
-Shelly
--
View
2023 Nov 08
1
Problem in R code
...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, sigma_x, sigma_y, amp)
{
exp(-((x - mu_x)^2/(2*sigma_x^2) + (y - mu_y)^2/(2*sigma_y^2)))*amp
}
#define a function for the sum of squared errors between the data and the
Gaussian
sse <- function(p)
{ mu_x <- p
mu_y <- p
sigma_x <- p
sigma_y <- p
amp <- p[5]
fitted <- gaussia...
2004 Feb 02
1
glm.poisson.disp versus glm.nb
Dear list,
This is a question about overdispersion and the ML estimates of the
parameters returned by the glm.poisson.disp (L. Scrucca) and glm.nb
(Venables and Ripley) functions. Both appear to assume a negative binomial
distribution for the response variable.
Paul and Banerjee (1998) developed C(alpha) tests for "interaction and main
effects, in an unbalanced two-way layout of counts
2012 Mar 27
2
Supperscript, subscript and double lines in the main/sub title and using greek letters
Dear R-help,
I am trying to express myself as best as I can here. If you also use Latex
to edit math reports or other languages with similar editing method,
you'll see what I'm talking about. My sincere appologies if my question is
not clear enough to some extend, as also I'm not able to provide my code
here because I don`t know which one I can use...
When editing the title in R
2007 Mar 09
1
help with zicounts
Dear UseRs:
I have simulated data from a zero-inflated Poisson model, and would like
to use a package like zicounts to test my code of fitting the model.
My question is: can I use zicounts directly with the following simulated
data?
Create a sample of n=1000 observations from a ZIP model with no intercept
and a single covariate x_{i} which is N(0,1). The logit part is
logit(p_{i})=x_{i}*beta
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 &&
2001 Oct 17
3
Type III sums of squares.
Peter Dalgaard writes (in response to a question about 2-way ANOVA
with imbalance):
> ... There are various
> boneheaded ways in which people try to use to assign some kind of
> SumSq to main effects in the presence of interaction, and they are all
> wrong - although maybe not very wrong if the unbalance is slight.
People keep saying this
2017 Aug 10
1
"Help On optim"
Hello,
I have some parameters from Mclust function. The parameters are in the form
*parametersDf *
* mu_1 mu_2 var_mc1 var_mc2 c1
c2 *
*2 1.357283 2.962736 0.466154 0.1320129 0.5258975
0.4741025 *
*21 8.357283 9.962736 0.466154 0.1320129 0.5258975
0.4741025 *
Each row in the above data frame
2008 Jul 28
1
Mixed model question.
I continue to struggle with mixed models. The square zero version
of the problem that I am trying to deal with is as follows:
A number (240) of students are measured (tested; for reading
comprehension)
on 6 separate occasions. Initially (square zero) I want to treat the
test time as a factor (with 6 levels). The students are of course
``random effects''. Later I want to look at
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
Thank you so much for your help.
The function "dbinom" seems to work very well.
However, I'm a bit lost with the "dnorm" function.
Apparently, I have to compute the mean "mu" and the standard deviation
"sd" but what does it mean exactly? I only have a vector of predicted
response and a vector of observed response that I would like to compare!
What
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