Tagged Questions
1
vote
0answers
19 views
Simulate LMM data with specific error values using R
I have a need to simulate data in R using the following:
Simulate data for 5 (or more) subjects, indexed by $i$, $(i=1,~...,~5)$ with $6$ observations per subject indexed by $t$ $(t=1,~2,~...,~6)$. ...
0
votes
1answer
73 views
Multiple Choice on Linear Regression
1. Which one is NOT a linear regression models? Please give a 1-2 sentences brief
explanation to your choice.
(a) $y_i = β_0 +\exp(β_1x_i)+E_i, i = 1, 2, \ldots, n$
(b) $y_i = β_0 + β_1x_i + β_2 ...
2
votes
1answer
158 views
Data Analysis using R
In preparation for my end of semester R exam, I've been working on the following CSV file which was modelled on R, which I'm currently having problems figuring out. The excercise is from the ...
1
vote
0answers
39 views
Fisher information for Poisson Model
Assuming the data structure given below,
$$
\left[\begin{array}{l|l}
y & x \\ \hline \hline
y_{1} & x_{1} \\
y_{2} & x_{2} \\
\vdots & \vdots \\
y_{n} & x_{n} \\
...
0
votes
1answer
50 views
Numerical and graphical summaries of data distribution and relationships
I'm studying regressions. I was asked to write graphical and numerical summaries of the distribution of four variables and their relationships. What is a proper way to do it say for example in R? The ...
1
vote
1answer
46 views
Randomization Tests
The following data are mandible lengths (mm) of 10 male and 10 female golden jackals Canis aureus in the collection at the British Natural History Museum. The two samples are independent.
...
1
vote
2answers
106 views
What model can I use to describe the following time-series?
I'm wondering if someone might be able to help me locate an appropriate model for the following two time-series (the cyan and blue one, the reds are rolling means).
I'm looking more for a general ...
3
votes
1answer
116 views
Test for bivariate outliers
I have been given a set of data points $(x_i,y_i)$. I have to plot a scatter plot and determine if there are any outliers. But I haven't been taught a method to measure which data point is an outlier ...
2
votes
1answer
52 views
Individual differences scaling, additional investigations
I am learning individual differences scaling (AKA three-way multidimensional scaling) and I want to know what different ways there are to state that my results are reliable.
I had to perform ...
3
votes
2answers
344 views
Likelihood ratio test in R
I am in desperate need for help. I am trying to calculate the likehood ratio test in R, but I don't have allot of experience using R.
For example, to calculate the following
Suppose $X_1, ...
0
votes
0answers
134 views
How to perform F test for multiple regression: $H_0: \beta_i = 0$ [closed]
This is for a homework that I'm supposed to do in SAS, but doing in R instead.
I want to perform an F-test for $H_0: \beta_i = 0$ for all $\beta_i$, all slopes equal to 0.
I have a linear model ...
2
votes
1answer
593 views
Deletion residuals
Please can you help me to solve this problem. It should be calculated by vectorization. The question is:
The i-th deletion residual $e_{(-i)}$ is defined as $e_{(-i)} = y_i - X^\top B_{(-i)}$
...
0
votes
0answers
106 views
Problems with basic R functions for a two-normal mixture (EM approach of parameter estimation)
I was trying to learn EM algorithm for simple two-normal mixture models, specially writing basic R function for parameter estimation. But my codes give me the same values that I started with! I can ...
0
votes
1answer
193 views
What model of multiple regression do I use to see if two independent variables affect a dependent variable, I also need to use two dummy variables?
I need to explore the determinants of wheat yield using multiple regression. There are 120 observations. Do I need to use ANOVA? I am using R studio. My results need to include a consideration of more ...
1
vote
1answer
200 views
0
votes
1answer
194 views
still trying in R with CI and predictions
I looked over the tutorial in R for prediction and decided to reword my question.
I need the prediction on average for male with a 95%CI then repeat with maximal values using the variables status, ...
-2
votes
1answer
150 views
Confidence interval for prediction in R [closed]
Using a data set from R, I need to find a 95% CI to predict a female with average
study, homework, and scores would pass SAT. Then I need to repeat the prediction for a female with maximal values for ...
1
vote
3answers
4k views
How to determine which variables are statistically significant in multiple regression?
From my model, I'm asked to determine which variables are statistically significant.
fitted.model <- lm(spending ~ sex + status + income, data=spending)
My ...
0
votes
1answer
203 views
Predicting the difference between two groups in R
I'm working on practice exercises with R. From the data, I now have to determine the difference in predicted male compared to female spending while keeping all other predictors constant.
I replaced ...
-1
votes
1answer
123 views
Bradley-Terry models by using R?
I want your help to Apply the Bradley-Terry models on any particular sport or any other idea of an application by using R. I am not familiar with R, can anyone help me ?
3
votes
2answers
432 views
Confused about sum and treatment contrasts
I'm currently studying for an Experimental Design exam. I feel like I'm missing something quite fundamental...
I've attached a minimal example to illustrate my confusion at ...
5
votes
4answers
640 views
Bootstrap, Monte Carlo
I have been set the following question as part of a homework:
'Design and implement a simulation study to examine the performance of the bootstrap for obtaining 95% confidence intervals on the mean of ...
10
votes
3answers
2k views
Interpreting plot of residuals vs. fitted values from Poisson regression
I am trying to fit data with a GLM (poisson regression) in R. When I plotted the residuals vs the fitted values, the plot created multiple (almost linear with a slight concave curve) "lines". What ...
1
vote
1answer
365 views
Fitting polytomous logistic regression with R
I'm running into troubles fitting a polytomous logistic regression model using grouped data. The data are of the form (dput at bottom):
...
3
votes
1answer
814 views
Explanation of R diagnostic plot for logistic regression
I'm hoping someone can explain this bit of R code for me related to glm(). I don't understand the diagnostic plot that has been suggested. It seems a more ...
3
votes
1answer
328 views
How to implement bootstrap efficiently in a matrix-based language?
I am working on a Monte Carlo study of bootstrapping in an AR(1) model for a homework assignment (I'm using Matlab). The goal is to say something about the empirical rejection probabilities of the ...
0
votes
3answers
180 views
How to perform ANOVA on response variable with indicator variable?
I have a data that looks like this
...
1
vote
1answer
101 views
What model to use for a 'spraying experiment'?
I separate my plants into four groups of 16, and I spray them to keep the bugs away:
...
1
vote
2answers
233 views
Computing ANOVA in R
Edit: I think the data was poorly given, varables coke, pepsi, and sprite were just given in 2 columns when I got it, but it has nothing to do with before and after treatment?
here's the original ...
-2
votes
2answers
310 views
How to draw random samples from a negative binomial distribution in R?
Let $X$ have the Negative Binomial distribution with parameters $r$ and $p$. The Negative Binomial distribution is a mixture distribution or compound distribution. That is $X$ is ...
10
votes
2answers
794 views
Approximating integrals using Monte Carlo simulation in R
How do I approximate the following integral using MC simulation?
$$
\int_{-1}^{1} \int_{-1}^{1} |x-y| \,\mathrm{d}x \,\mathrm{d}y
$$
Thanks!
Edit (Some context): I am trying to learn how to use ...
8
votes
4answers
414 views
Classic linear model - model selection
I have a classic linear model, with 5 possible regressors. They are uncorrelated with one another, and have quite low correlation with the response. I have arrived at a model where 3 of the regressors ...
2
votes
1answer
691 views
R code for two sample t-test in case of equal variances
In R, how can I perform a two sample t-test in the case of equal variances?
My actual problem is to compare different algorithms for length measurements in machine vision.
I have studied Applied ...
4
votes
2answers
541 views
Uncorrected pairwise p-values for one-way ANOVA?
I'm performing a relatively simple one-way ANOVA as part of a class exercise. I'd like to get pairwise uncorrected p-values out of R, so I can do a sequential FDR test in another package (I realize ...
6
votes
1answer
2k views
Coverage probabilities of the basic bootstrap confidence Interval
I have the following question for a course I'm working on:
Conduct a Monte Carlo study to estimate the coverage probabilities of
the standard normal bootstrap confidence interval and the basic ...
2
votes
2answers
920 views
Monte Carlo experiment to estimate coverage probability
I'm working on a problem as follows for a course that I'm auditing:
Suppose a 95% symmetric t-interval is applied to estimate a mean, but the
sample data are non-normal. Then the probability ...
6
votes
5answers
2k views
Better Classification of default in logistic regression
Full Disclosure: This is homework. I've included a link to the dataset ( http://www.bertelsen.ca/R/logistic-regression.sav )
My goal is to maximize the prediction of loan defaulters in this data set. ...
3
votes
2answers
2k views
Interpreting the step output in R
In R, the step command is supposedly intended to help you select the input variables to your model, right?
The following comes from
...
3
votes
2answers
3k views
Interpreting the drop1 output in R
In R, the drop1command outputs something neat.
These two commands should get you some output:
example(step)#-> swiss
...
