I have weekly data values extracted from google trends and I want to apply time series in R for predicting future values. I have tried using auto.arima() but the results seem to be only one constant value for all future prediction, and if i manually give random parameters in arima(c(p,d,q)), I am getting various types of results. So how to determine appropriate values for my data.
data2<-ts(data$Volume)
[1] 64 74 64 68 100 87 79 72 66 74 58 68 65 71 71 71 63 65 62 58 58
[22] 58 58 60 56 51 56 52 58 59 58 60 66 67 69 67 80 66 73 73 72 68
[43] 66 70 69 66 68 67 60 50 36 50
fit<-auto.arima(data2)
pred<-predict(fit,n.ahead=30, interaval="prediction", se.fit="FALSE")
plot(pred)
pred

fit<-arima(data2,c(3,1,1)
pred<-predict(fit,n.ahead=30, interaval="prediction", se.fit="FALSE")
plot(pred)
pred

This answer assumes you know what the parameters (p,d and q) mean, if not, you need to do some reading. Now, there are two set of parameters to be supplied in an ARIMA call: trend and seasonal.
When you have idea of whether there is need for trend and/or seasonal differencing, you can try some values for the d and/or D parameter and visualize the differenced series to decide appropriate value. Or, you can do ACF on the differenced series and stop before the correlations end up starting with a negative value.
Now, do ACF and PACF plotting on the differenced(stationary) series. Identify till what lags do you want to keep for AR/MA terms. Usually keeping either one of them to a non-zero value should be okay. As a rule of thumb, if ACF falls rapidly to negative values, use MA, else if it falls gradually, use AR.