Enable contrast version

# Tutor profile: Tomas C.

Inactive
Tomas C.
Tutoring since 2015
Tutor Satisfaction Guarantee

## Questions

### Subject:R Programming

TutorMe
Question:

What is the difference between & and && in R?

Inactive
Tomas C.

The functional & is a vectorized operation, meaning it can return a vector. For example: x <- 1:10 x %% 2 == 0 & x > 5 will return a vector  FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE On the other hand, && only evaluates the first element of each vector x <- 1:10 x %% 2 == 0 && x > 5  FALSE

### Subject:Statistics

TutorMe
Question:

What is a general method to estimate the variance of an estimator when it is not possible to derive its formula?

Inactive
Tomas C.

Bootstrap is an excellent option. It takes samples with replacement from the sample obtained, calculates the estimate with each subsample as the original sample, and estimates the variability through the variability in the estimates of the subsamples. This method also allows to obtain the whole sampling distribution of an estimator, meaning we could estimate much more interesting things than just the variance.

### Subject:Data Science

TutorMe
Question:

Can you include explanatory variables in a linear model when it is not related linearly with the response variable?

Inactive
Tomas C.

Yes. The term linear model does not mean that each explanatory variable is linearly related to the outcome. It just means that each of the terms of the model is related to the outcome linearly. Then, the model $$y = \beta_0 + \beta_1x + \beta_2x^2$$ is linear because each predictor, $$x$$ and $$x^2$$ is linearly related to $$y$$ through each $$\beta$$ coefficient. However, it does not mean that $$y$$ and $$x$$ are linearly related. The relationship shown there is quadratic, indeed.

## Contact tutor

Send a message explaining your
needs and Tomas will reply soon.
Contact Tomas